Poland has veered sharply to the political right after its general election on Sunday, an outcome that will likely see increased tensions within the European Union and in the EU's relations with Russia.
The Law and Justice party (or PiS as it is known by its Polish acronym) will likely gain 232 seats in the 460-member Lower House of Parliament, according to the latest exit polls. Among other things, PiS had campaigned against taking in any more migrants from the Middle East. It is also suspicious of moves towards deeper European integration.
The rise of PiS at the expense of the Civic Platform party suggests Poland may well transition from being Europe's poster child to one of the EU's most prickly member-states.
The swing to the conservative opposition party is record-breaking in at least two respects. First, the results are Poland's first overall majority for a single party since the 38 million-strong nation ditched communism a quarter of a century ago.
Poland is also set to become the only European state in which no left-wing party enjoys parliamentary representation; all of the country's newly elected lawmakers belong to various right-wing political formations.
It was a stinging rebuff of Prime Minister Ewa Kopacz's outgoing centrist government, even though it did well in managing the economy.
Under the Civic Platform party, Poland's output grew fivefold since the end of the Cold War. It also shielded Poland from the financial crisis which struck the rest of Europe in 2008; since then, the country's economy grew by a remarkable 23 per cent in cumulative terms.
Poland's international reputation also flourished. It adopted a conciliatory approach to Russia and forged a close alliance with Germany; the country's two big neighbours were treated as partners. And Mr Donald Tusk, a former prime minister and founder of the Civic Platform, is now president of the European Council, the EU's highest official, a huge achievement for a nation which only a generation ago lay forgotten behind the Iron Curtain.
But Ms Kopacz did a terrible job in selling her government's record. And the opposition PiS skilfully exploited public discontent with the fact that economic growth has yet to percolate to ordinary Poles. The average after-tax monthly salary is equivalent to only €700 (S$1,080), a third of the level in Germany.
Mrs Beata Szydlo, the PiS standard-bearer, once batted away her rivals' claims of success with the dismissive "statistics won't feed us".
The 52-year-old Mrs Szydlo is now the prime minister-designate. Born in Oswiecim, the town where the Nazis ran the notorious Auschwitz extermination camp during their World War II occupation of Poland, she wants to improve Poland's future, rather than rake over historic wounds.
The snag is that she is not her own master, for the PiS is actually run by Mr Jaroslaw Kaczynski, a former prime minister whose twin brother, Polish president Lech Kaczynski, perished in a 2010 plane crash over the skies of Russia, which also killed many other Polish top officials.
Mr Jaroslaw Kaczynski is unlikely to hold any government position; he has accepted that he is far too personally unpopular to front his party. Still he is expected to lead the new government's foreign policy, and often in a confrontational direction.
Mr Kaczynski frequently hinted at his belief that the culprits behind the plane crash were Russian intelligence agents, and has demanded a reopening of the inquiry into the disaster. Such a move is bound to sour relations with Russia, already tense as a result of the crisis in Ukraine.
Mr Kaczynski is also likely to demand additional support from Nato, the US-led military alliance in Europe. Poland is scheduled to host Nato's summit of heads of state and governments next year.
He is unlikely to be very friendly to Germany either, a country which both he and his late brother deeply mistrusted, although the personal criticism which the brothers used to heap on German Chancellor Angela Merkel is likely to be toned down.
But the biggest change will come in Poland's policy towards the EU. The new government will refuse to accept any new refugees from the Middle East. Mr Kaczynski has harshly criticised the outgoing government's decision to accept refugees from Syria, warning that the "migrants carry diseases" and will be a threat to Poland's Catholic Christian identity.
Poland is also likely to make common cause with Britain in opposing any further European integration. After years of facilitating political compromises, the Poles look set to join Europe's awkward squad.