WARSAW, Poland -- The leaders of the Polish opposition parties that together won the most votes in last month's election signed a coalition agreement on Friday that vows to restore the nation's legal order and strengthen its international position and security in light of Russian aggression against neighboring Ukraine.
The parties collectively won the Oct. 15 vote, but still will not have an immediate chance to try to form a government.
The current governing Law and Justice party received more votes than any other single party but fell far short of a majority. Still, it will get the first chance to form the next government -- something widely viewed as doomed to fail.
The opposition groups called themselves the "democratic opposition" as they ran on separate party lists but vowed to cooperate to restore democracy after eight years of rule by Law and Justice, which has been accused by the EU of eroding the rule of law.
Their candidate to be the next prime minister is Donald Tusk, a former prime minister who leads the largest of the opposition parties, the centrist and pro-European Union group Civic Coalition.
Tusk, also a former top leader of the European Union, said the coalition agreement offers "signposts and recommendations for our work."
The agreement cites "the unprecedented threat to our security caused by Russian aggression against Ukraine" and pledges to strengthen Poland's international position, including in the EU and NATO.
"We will consistently uphold Polish interests by conducting a clear and calculable foreign policy that is intelligible to friends and deterrent to the enemies of our country," the document said, a clear rebuke of the sometimes combative tone taken by Law and Justice with foreign partners, even allies such as Germany and Ukraine.
Law and Justice, a right-wing populist party, won 194 seats in the 460-seat lower house of parliament, while the parties that signed the agreement together have a comfortable majority of 248. Law and Justice has no potential coalition partner, not even in the far-right Confederation party.
President Andrzej Duda nonetheless gave Prime Minister Mateusz Morawiecki of Law and Justice a first chance to try to form a government. Commentators believe Duda tapped him to show loyalty to Law and Justice, the party he is allied with.
But the opposition is sure of its potential.
"Things are going in the right direction," Tusk said at the signing ceremony. "Regardless of the decisions that are on the side of President Andrzej Duda, we are ready to take responsibility for our homeland and for the coming years."
The coalition represents a broad alliance of parties with sometimes conflicting views. One key area of disagreement is abortion, a highly divisive issue in a traditionally Catholic country undergoing rapid secularization. The abortion law was tightened under Law and Justice and a near-total ban is now in place.
Tusk's Civic Coalition is an electoral alliance of four parties led by his centrist Civic Platform party which also includes the Greens.
A new political group called the Third Way includes the long-established agrarian party, the Polish People's Party, and Poland 2050, a relatively new party led by Szymon Holownia, a conservative Catholic who had trained to be a Dominican friar but became a journalist and was co-host of Poland's Got Talent reality show.
Another coalition partner, the New Left, includes some former members of the pre-1989 Communist Party but increasingly a new generation of younger progressives. It stresses support for women's and LGBTQ+ rights and for fighting climate change.
"Today we are sending an important signal to Europe and the world," said New Left co-chairman Robert Biedron. "Poland is returning to the democratic, law-abiding map of Europe and the world that respects human rights."
His fellow co-chair, Wlodzimierz Czarzasty, acknowledged that the coalition agreement would require a lot of compromise and that his group would not get everything it wants. Still, he expressed satisfaction that the left appeared poised to return to government for the first time in 18 years.