Poland's parliament has voted in favour of an opposition motion to elect Donald Tusk as the country's new prime minister.
A total of 248 members of parliament supported Mr Tusk's nomination, against 201 who voted against it.
In a brief speech, Mr Tusk thanked the Polish people and addressed Law and Justice representatives, saying that on election day "millions of Poles woke up and decided to remove you from power".
Mr Tusk, who was previously Poland's prime minister from 2007 to 2014, and European Council president from 2014 to 2019, will present his programme for government in parliament tomorrow morning.
A confidence vote on the new coalition government will then take place tomorrow afternoon, which is also very likely to pass.
If that schedule holds true, Mr Tusk is likely to be sworn in as prime minister by Polish President Andrzej Duda on Wednesday, one day before EU leaders meet for a Council summit in Brussels.
Earlier this afternoon, a vote of confidence in Poland's outgoing Law and Justice government was defeated by the opposition, 266 votes to 190.
That vote marked an end to eight years of rule by the country's nationalist-populist party.
It follows weeks of negotiations in the wake of October's general election. The outgoing Law and Justice government, led by Prime Minister Mateusz Morawiecki, was sworn into office two weeks ago in line with Poland's constitution.
In a protracted process, Mr Duda gave Mr Morawiecki, as leader of the largest party, 14 days to name a cabinet, and then another 14 days to win a vote of confidence.
But Mr Morawiecki's party won just 194 seats on 15 October, 37 seats short of a majority.
The opposition bloc, led by Mr Tusk, won a combined number of 248 seats.
Far-right party Confederation also voted against the outgoing government.
Mr Morawiecki spent much of a lackluster speech defending his government’s record on the economy, saying Poland's debt-to-GDP ratio had decreased by 3.5% during his party's time in government.
The defeat of Mr Morawiecki's government "just confirms that the past two months were a charade," Adam Jasser, a former head of policy for Mr Tusk, told RTÉ News.
"It was clear to anybody since 15 October that the current government simply didn't have a majority," he said.
Following today's first vote, the opposition bloc, which combines two centre-right parties, the socialists, and a socially conservative farmers party, proposed Mr Tusk as its candidate for prime minister.

Former Polish President and leader of the Solidarity trade union movement, Lech Walesa, was in attendance and received a rousing round of applause from opposition MPs.
Mr Walesa, though no longer in politics, has been a critic of Law and Justice’s moves to interfere with the independence of the judiciary.
The defeat of the Law and Justice government brings to a close two months of waiting by the coalition parties to nominate their candidate for prime minister.
As early as 17 October, two days after the general election was held, the leaders of the four opposition parties held a joint press conference, outlining that they would form a coalition government.
A formal agreement between the four parties soon followed.
Instead, Polish President Andrzej Duda asked Mr Morawiecki to form a government on the basis that Law and Justice won the largest number of seats of any party.
A priority for the incoming coalition government is to unlock €35bn in EU recovery funds, frozen on account of concerns by the European Commission over the previous government’s record on the rule-of-law.
Since 2015, Law and Justice administrations exerted control over the Constitutional Tribunal, the country’s highest court, and the National Council of the Judiciary, a body that appoints and promotes judges.
Both courts are currently stacked with Law and Justice appointees.
Jakub Jaraczewski, a legal expert on EU rule-of-law, told RTÉ News that it will be challenging for the incoming government and a new minister of justice to "make any sweeping changes" to legislation introduced by the previous government.
However, Mr Jaraczewski, who works with Democracy Reporting International, a Berlin-based think tank, said that the coalition’s "willingness to show a determination to make changes on the rule-of-law" could help to unlock some of the frozen funds.
The coalition will have to contend with Mr Duda’s veto powers which, he used on rare occasions during the Law and Justice years.
Mr Duda is an ally of Law and Justice and could veto major legislation that goes against his socially conservative views, such as the current near-total ban on abortion.
A new government led by Mr Tusk is also tipped to make changes to the senior management of public media, also staffed by Law and Justice loyalists.
State broadcaster TVP regularly airs reports which echo the views of Law and Justice and criticises the opposition and Mr Tusk.
Relations with Ukraine is another area that the incoming government will seek to prioritise.
Poland remains a strong supporter of Ukraine's EU and NATO ambitions, but relations between Kyiv and the outgoing government in Warsaw soured in recent months following a dispute over Ukrainian grain imports and an on-going strike by Polish truck drivers at the border between both countries.