Iceland Prime Minister Sigmundur David Gunnlaugsson stepped down on Tuesday following protests over the ownership of the offshore company Wintris. The resignation is the first high-profile casualty of the Panama papers leak.

The Panama papers refer to the leaked 11 million documents that contained details on the money stashed away in offshore tax havens by the world’s rich and powerful.

According to the documents, the prime minister and his wife, Anna Sigurlaug Palsdottir, owned an offshore company since 2007. The company had big claims on Iceland’s banks and was not declared at the time he entered the parliament. By law, they are required to state their assets publicly.

Gunnlaugsson was accused of tax avoidance on millions of inherited dollars. He sold 50 percent of the company’s shares to his wife for US$1 (AU$1.32), eight months after he entered the parliament in 2009.

He said his wife has not benefited financially from it and denied any wrongdoing.

The disclosure infuriated his people, who gathered outside the parliament on Monday, chanting slogans, waving bananas and hurling eggs in protest.

Earlier on Tuesday, the prime minister requested the President of Iceland, Olafur Ragnar Grimsson, to dissolve the parliament and facilitate an early election. But Grimsson wanted to consult the Independence party, which has been in the ruling coalition with Gunnlaugsson’s Progressive Party since 2013, on the issue, the BBC reported.

But, Gunnlaugsson decided to resign, ahead of the confidence vote, which was sought by the opposition parties.

The leak of the Panama Papers created outrage on how the wealthy and the powerful people avoided tax while the common mass took the austerity and hardship on themselves.

Mossack Fonseca, the firm responsible for creating offshore companies, denied the charges. The Panamanian government also tried to defend its reputation on Tuesday, Reuters reported.

In the resignation statement, Gunnlaugsson said that he doesn’t want to stand in the way of government work any further.