Sweden's newly elected prime minister resigned less than 12 hours after being sworn into office.  Social Democrat Magdalena Andersson, the country's first female prime minister, quit after her two-party coalition, the Green Party, collapsed.

The collapse of the two-party coalition has raised concerns of political uncertainty in the county. The party walked out after parliament rejected its budget bill.

Andersson took over as Prime Minister from Stefan Lofven, who was the leader of a two-party minority government that included the Left and the Centre. However, when the Centre Party refused to support the new government's financial plan, the coalition fell apart.

On Wednesday, Parliament enacted expenditure proposals drafted by three opposition parties, compelling the Green Party to leave the government and forcing Andersson to resign.

The speaker of parliament will now select the next stage in the search for a new government, although Andersson will almost certainly face a fresh vote in the following days.

Andersson said she is still willing to be the country's prime minister, and she hopes to lead the country with a single-party government. Political analysts said there is a strong possibility of Andersson still leading the country given the strong support from other political parties.

"I have asked the speaker to be relieved of my duties as prime minister. I am ready to be prime minister in a single-party, Social Democrat government," Andersson said.

The Green Party also supports Andersson's reinstatement in a confirmation vote in parliament. The Left Party said it would back Andersson if she chose to return as prime minister. The Centre Party said it would abstain from voting, effectively backing Andersson's candidacy.

While the major parties were unable to reach an agreement on a budget, they are unified in their desire to prevent the Sweden Democrats, a populist anti-immigration party, from entering government. The Sweden Democrats support the opposition right-wing Moderates and Christian Democrats, although they do not have a majority in parliament.

Regardless of who becomes Prime Minister, he or she will have significant challenges following the national elections scheduled for September.

The COVID-19 pandemic showed flaws in the much-touted welfare state, and if the government wants to reach its climate change targets, it must accelerate the transition to a greener economy.

Many in Sweden are embarrassed that it has taken this long to elect a female prime minister in a country that instituted universal suffrage 100 years ago and has long championed gender equality.