PRAGUE — Czech President Milos Zeman was rushed to the intensive care unit of a military hospital on Sunday, hours after the party of his political ally, billionaire Prime Minister Andrej Babis, was defeated in the country's general election.

The unexpected development complicates efforts to form a new government. Zeman and Babis, who appears to have been weakened by revelations in the Pandora Papers leaks, were expected to meet on Sunday morning in what some opposition members interpreted as a sign that the president might seek to keep the prime minister in power despite the election result. But shortly after the meeting was scheduled to take place, Zeman was seen being transported to a hospital by ambulance.

In a news conference on Zeman’s hospitalization, hospital director Miroslav Zavoral cited “complications accompanying his chronic illness” but did not elaborate on the illness from which the president suffers or whether he was conscious.

Zeman has been reported to suffer from diabetes and neuropathy.

On Monday, the hospital released a brief statement only saying he was in stable condition after being treated in intensive care.

Zeman’s hospitalization adds further uncertainty to the outcome of the election, which left the opposition with a far clearer path than Babis’s party to form a government — but did not fully block the prime minister’s chances of leading a minority government with the support of the president.

The Pandora Papers roared into the Czech election last week. Allegations that Babis used shell companies to purchase a $22 million French chateau in 2009 probably cost the incumbent some votes.

The two alliances that opposed Babis combined to win a majority in the vote Friday and Saturday. In a surprise, the center-right alliance finished narrowly ahead of the party led by Babis.

Czech media outlets had reported for days that Zeman was seriously ill. But he still was expected to play a key role in the formation of the next government.

If he were to be incapacitated, some of his powers would in the short term be transferred to Babis and one of his key allies, the constitutional expert Jan Kysela told the Czech newspaper E15. But in the long term, it could further complicate Babis’s effort to remain in power.

Zeman previously suggested that he might appoint Babis prime minister even if he did not hold a parliamentary majority — a move some analysts said would push constitutional limits.

The president’s rationale was that Babis’s political base is composed of one party, while the opposition formed two alliances of several parties — a move the prime minister called “a scam on voters.” Zeman was expected to argue that Babis was still the head of the country’s largest party even if it finished second to an opposition alliance.