Sweden’s first female Prime Minister, Magdalena Andersson, has resigned from office only hours after being voted in, Sweden’s official Twitter account announced.

The dramatic move came before Andersson was fully in office as she had not yet had counsel with the King, a spokesperson said.

Her resignation follows a budget defeat in Parliament Wednesday, Sweden’s Twitter account added, with lawmakers supporting the opposition’s bill.

The Green Party has also decided to leave the minority coalition government with Andersson’s Social Democrats, it said. “The current government will remain as an interim government until a new government is in place,” it added.

Andersson, 54, said she had told the speaker of Parliament she hoped to be reappointed as prime minister at the head of a “single-party, Social Democrat government,” Reuters reported.

She replaced Stefan Löfven, who recently stepped down as both the country’s premier and as leader of the Social Democrats party.

All the other Nordic countries — Finland, Denmark, Norway, and Iceland — have previously elected female national leaders.

As Prime Minister, Andersson was preceded by 33 men. She previously worked as deputy director-general of the Swedish Tax Agency, according to her CV on the Swedish government website.

She holds a master’s degree in economics from the Stockholm School of Economics and has served as Sweden’s finance minister since 2014.

She is also the second woman to head up the center-left Social Democrats party, according to Sweden’s Twitter account.