Icelandic Prime Minister Sigmundur David Gunnlaugsson resigned Tuesday after the Panama papers exposed his holdings in off shore accounts.

Vice Prime Minister Sigurður Ingi Jóhannsson will take over as interim prime minister until the parliament decides on whether or not a new election should take place. Gunnlaugsson will remain as leader of the Progressive Party.

Gunnlaugsson first announced his intentions to dissolve the current parliament Tuesday unless his ruling coalition backs him to stay in office.

Gunnlaugsson is one of 12 world leaders named in the Panama Papers. The leak revealed Gunnlaugsson held shares in Wintris, Inc., a company registered in the British Virgin Islands. The company invested in some of the same banks he spoke out against after the country was rocked by the 2008 financial crisis. (RELATED: Icelandic Prime Minister Had Financial Ties With the Same Bankers He Helped Imprison)

Thousands of people demonstrated outside the Icelandic parliament in Reykjavik Monday and called for Gunnlaugsson to resign. Gunnlaugsson first said he would remain in office and fight a vote of no confidence. His even said “bring it on!” when the Panama papers were released.

After meeting with Finance Minister Bjarni Benediktsson Tuesday, he changed his mind and announced he would dissolve the parliament and call a new election unless the parties in his coalition back him to remain in office. (VIDEO: Here’s The Awkward Moment Iceland’s PM Realizes His Big Secret Is Out)

“If the party’s MPs don’t have the courage to support the government in completing our common projects, I would dissolve parliament and call for elections as soon as possible,” Gunnlaugsson wrote on Facebook. “I’m proud of my work in politics so far, and unafraid to put that in the judgement of voters, be it now or later. I’m also proud of my wife and the honesty and sacrifice she has always shown.”

Gunnlaugsson met with President Ólafur Ragnar Grímsson to discuss a possible dissolution of parliament. Grimsson denied Gunnlaugsson’s initial request, saying he couldn’t allow it until majority of the parliament votes in favor of it. Gunlaugsson then decided to resign instead.

Follow Jacob on Twitter

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.