One thing was clear after France’s surprise election results on Sunday: Any new government formed by President Emmanuel Macron would face months of political paralysis. What’s less certain is whether that gridlock will tip France’s heavily indebted economy further into distress.

The turmoil has focused attention back on France’s ballooning €3 trillion debt and a deficit that has grown to more than 5 percent of economic output, and immediately prompted a warning on Monday from the Standard & Poor’s ratings agency over France’s sovereign debt rating.

“Uncertainty hangs over France’s future government architecture,” said the agency, which had already downgraded France’s debt rating on May 31, rattling the government, whose economic credibility has been one of its main political assets. Should the polarization of France’s new Parliament weaken the government’s ability to mend its finances, France’s debt could be downgraded again, it added.

France is facing uncharted territory after left-wing parties surged unexpectedly in nationwide legislative elections, eclipsing the nationalist, anti-immigration National Rally party to secure the most seats in the lower house of Parliament. The result left no party — including Mr. Macron’s centrist coalition — with a majority and has splintered the lower house of Parliament into three bitterly antagonistic blocs.