Polish President Bronislaw Komorowski conceded defeat to conservative challenger Andrzej Duda in Sunday's presidential election, a result that will set alarm bells ringing for the government, which faces its own election race later this year.
Komorowski had originally been seen as a shoo-in for another term in office, and his defeat reflected a desire among voters for new faces, and a sense that Poland's new-found prosperity was not being shared out equally.
The outgoing president, an ally of Prime Minister Ewa Kopacz, announced he was conceding defeat after an exit poll showed he had won 47 percent to 53 percent for Duda. Official results have not yet been released.
"I respect your choice," Komorowski told a gathering of supporters. "I wish my challenger a successful presidency."
The victory for 43-year-old Duda marks the first major electoral win in almost a decade for his party, the opposition Law and Justice party. It is close to the Catholic church, socially conservative, and markets see it as less business-friendly than the governing Civic Platform.
Poland's zloty currency was down 1 percent against the euro after the exit poll was released, a sign some investors are already expecting a change in government.
In Poland, the prime minister leads the government but the president is head of the armed forces, has a say in foreign policy and in the passage of legislation, and also controls who heads the central bank.
Duda served as legal adviser to former conservative President Lech Kaczynski, was a deputy justice minister, a member of the Polish parliament, and is now a member of the European parliament.
He has yet to spell out explicitly how he will use his new powers, but he could promote a more skeptical approach to the European Union, and block socially liberal initiatives such as a proposed law that would support in-vitro fertilization.
Beata Szydlo, deputy head of Law and Justice said of Duda's plans once in office: "He realizes that he will have to cooperate with the government, but this is a president who listens to all Poles. He will not sign bills that are directed against them."
Duda's win throws down a gauntlet to the center-right Civic Platform party, which has for years dominated the political landscape and controls the longest-serving government in Poland's post-Communist history.
Eight years in power, the party has presided over rapid economic growth and rising salaries in eastern Europe's biggest economy.
But many Poles feel their country's vaunted "economic miracle" has passed them by.
"Economic growth? For the average citizen it is hardly perceptible," said Zbigniew Pela, 53, a railway worker who was voting for Duda on Sunday. "They create good living conditions for some social groups, who have their businesses, and not for ordinary citizens."
Foreign Minister Grzegorz Schetyna said Sunday's result was a serious warning for Civic Platform. "We have to ask ourselves difficult questions ahead of the next elections," he told public broadcaster TVP Info.