Czech President Milos Zeman was rushed to the hospital on Sunday, a day after the country held parliamentary election in which populist Prime Minister Andrej Babis' party surprisingly came in second and Zeman has a key role in establishing a new government.

The Czech presidency is largely ceremonial but the president chooses which political leader can try to form the next government. Earlier Sunday, Zeman met with Babis, his close ally, but the prime minister made no comment as he left the presidential chateau in Lany, near Prague.

On Saturday, the centrist ANO (Yes) party led by Babis, a populist billionaire, narrowly lost the Czech Republic’s election, which could spell the end of the euroskeptic leader’s reign in the European Union nation of 10.7 million people.

BARCELONA SAYS AUDIT SHOWS CLUB WAS TECHNICALLY BANKRUPT

Czech Republic's President Milos Zeman is admitted to the Military hospital in Prague, Czech Republic, Sunday, Oct. 10, 2021. (AP Photo/Petr David Josek)

Czech Republic's President Milos Zeman is admitted to the Military hospital in Prague, Czech Republic, Sunday, Oct. 10, 2021. (AP Photo/Petr David Josek)

A liberal-conservative three-party coalition named Together captured 27.8% of the vote, beating Babis’ ANO, which won 27.1%. In a second blow to the populists, another center-left liberal coalition received 15.6% to finish third.

The winning coalition won 71 seats while its third-place partner captured 37 seats to have a comfortable majority of 108 seats in the 200-seat lower house of Parliament, and they pledged to work together. Babis's party won 72 seats, six less than in the 2017 election.

But Zeman earlier indicated he would first appoint the leader of the strongest party, not the strongest coalition, to try to form the government. That would give Babis a chance to give it a try to find a majority for his possible new government.

If he fails, as expected, and his latest government doesn’t win a mandatory confidence vote in the house, Zeman could ask him to try to create a new government again.

That has happened before. With no deadlines for the president’s move, the country faced a long term of political instability from the October 2017 election until July the following year, when Babis’ second Cabinet finally won the confidence vote.

"It would be no surprise if the election’s loss wouldn’t become reality for Babis for the following months," said analyst Petr Just from Metropolitan University Prague.

But unlike in 2017, this latest election produced a clear winner. Petr Fiala, the leader of Together and its candidate for prime minister, urged Zeman to accept the election results.

"The opposition has gained a clear majority in the lower house," Fiala said. "The Constitution clearly says that a government needs support of a majority. We’ll see what steps President Zeman is to take but it’s essential that he cannot ignore that."

ROME'S MAYOR VOTED OUT OF OFFICE AMID CONTROVERSIES OVER CITY DECAY, TRASH, WILD BOARS

In his only post-election comment, Zeman congratulated the election winner and all elected lawmakers.

If Zeman is not able to act due to his illness or other reasons, the prime minister and the speakers of both houses of parliament will take over his presidential powers. If that happens, the new speaker of the lower house selects the premier. The parliament has to meet within 30 days of the election to select the speaker and other officials.

In other election results, the anti-migrant and anti-Muslim force in the Czech Republic, the Freedom and Direct Democracy party, which wants the country to leave the EU, finished fourth with 9.6% support, or 20 seats. In another surprise, the Social Democrats and the Communists, the country’s traditional parliamentary parties, both failed to win seats in parliament for the first time since the split of Czechoslovakia in 1993.

Prague’s military hospital confirmed that Zeman was transported there Sunday. Zeman, 77, is a heavy smoker and drinker who has suffered from diabetes. He has trouble walking and has been using a wheelchair.

"The reason for his hospitalization are the complications that accompany the chronic disease for which we treat him here," said Dr. Miroslav Zavoral, the director of the clinic. He declined to elaborate.

Jiri Ovcacek, the president's spokesman, later said his current stay in hospital doesn't threaten the country's post-election negotiations and his Constitutional duties. He said Zeman has asked to receive media monitoring on a daily basis.

Zeman was previously admitted on Sept. 14 for what his office described later as a planned examination. The office said the president was only dehydrated and slightly exhausted. Zeman was released after eight days, his longest hospital stay.

CLICK HERE TO GET THE FOX NEWS APP

He spent four days in the same hospital in 2019 for similar reasons.