Magdalena Andersson, the first female prime minister in the history of Sweden, resigned a few hours after her appointment.
Andersson, a social democrat, took over the government on Wednesday, but resigned the same day after one of her coalition partners left the government and her proposed budget was not adopted.
At the same time, the parliament voted for the budget developed by the opposition, which includes the anti-immigrant far-right party "Swedish Democrats" and the conservative "Moderate Party" and Christian Democrats.
Mrs. Andersson said that she hopes to try again to become prime minister as the head of a one-party government that will have a minority in parliament.
"There is a constitutional practice according to which the coalition government must resign when one party leaves it," the leader of the Social Democrats explained on Wednesday. "I don't want to lead a government whose legitimacy will be questioned."