Swedish Prime Minister Stefan Lofven has handed in his notice of resignation, giving Parliament’s speaker the job of finding a new premier.

The resignation comes after the Social Democrat leader lost a vote of no-confidence last week.

Lofven lost the confidence vote in parliament on June 21 after the Left Party withdrew its support, triggering frenzied talks as both the center-left and center-right tried to line up enough support to form a government.

He had until midnight tonight to find fresh backing in Parliament, enabling him to hand over the job of finding a new government to the speaker with the expectation of being re-appointed.

The other choice was to call a snap election.

The center-left and center-right blocs are now evenly balanced in parliament and opinion polls show a general election will not change the

It took Lofven four months to form a government after 2018’s inconclusive election.