Poland's defeated conservative Prime Minister Jaroslaw Kaczynski has tendered his government's resignation.
President Kaczynski (L) may clash with the new government
He presented the resignation to his twin brother Lech, the Polish president, in a televised ceremony.
President Kaczynski is expected to nominate liberal leader Donald Tusk as prime minister later this week.
Mr Tusk's Civic Platform party won the 21 October election, but did not secure enough seats to govern alone. The small Peasant's Party is expected to join it.
Mr Tusk has promised to improve strained relations with Poland's neighbours and take advantage of the country's strong economic growth.
But there are already signs the new government will clash with President Kaczynski, the BBC's Adam Easton reports from Warsaw.
The 58-year-old head of state can veto bills and he has said he will do so if Mr Tusk tries to introduce a flat-rate income tax.
The president also has a large say in foreign policy and is concerned the new prime minister may be too soft when dealing with Berlin or the European Union.
The resignation ceremony took place at the presidential palace in Warsaw.
The ceremony required the outgoing prime minister to hand in an official letter of resignation to his brother.
In his resignation speech, Jaroslaw Kaczynski outlined what he saw as the key achievements of his government.
"We have ended our mission in government with our heads held high. The economy is in fine form and the past two years have reinforced Poland's position in Europe," he said.
But he also complained of the "very difficult circumstances" in which his government had had to work.