Iceland’s government appointed Sigurdur Ingi Johannsson as the new prime minister and pledged for early elections before the end of this year. The move came a day after its former leader and Progressive Party Chairman Sigmundur Gunnlaugsson resigned over ownership of an offshore company.

Johannsson, 53, served as the deputy leader of the Progressive Party and the agriculture and fisheries minister.

The former prime minister resigned following public outrage over the ownership of an offshore company. It was used to avoid tax on millions of dollars of inheritance.

Documents showing details of the company were revealed in the Panama Papers leak, which led to the first major casualty of the disclosures. The leaks involved the disclosure of 11 million documents containing information on offshore tax havens of the world’s rich and powerful.

Interest in the offshore company was not declared by Gunnlaugsson at the time he entered parliament. Eight months later, he sold 50 percent of the company’s share to his wife for US$1 (AU$1.32). He denied any wrongdoing and said his wife did not benefit from the investments made by the company.

Birgitta Jónsdóttir, the leader of the opposition Pirate party, earlier demanded the government to step down immediately and call for snap elections. She has now agreed to advance the polls from 2017 to autumn this year.

It is still unclear whether the move would find acceptance with the angry Icelanders, who continued to stage protests outside the parliament for the third consecutive day. The protesters hurled eggs, bananas, and yoghurt at the walls and the windows of the national assembly.

“We have to be able to have our say on what has happened. It has done great damage. We want these people to go – and go for good,” the Guardian quoted one of the protesters against Iceland’s government, as saying.

Some of the opposition parties are unhappy with the new deal and still want to go ahead with the no-confidence vote, but the government now has a comfortable majority and the crisis that surfaced a with the Panama papers leak seems to be over now, the BBC reported.