Iceland's prime minister has sensationally resigned two days after he was caught up in the offshore tax scandal.

Sigmunder David Gunlaugsson is the first victim from the leaked Panama Papers which revealed the tax-avoidance arrangements of the rich and famous around the world.

The documents claimed he and his wife set up a company in the British Virgin Islands to hide millions of pounds with the help of Panama law firm Mossack Fonseca.

The revelations sparked fury across Iceland, with thousands gathering outside parliament to demand he stand down and opposition leaders presenting a motion of no-confidence against him.

Gunlaugsson, who denies wrongdoing, initially refused to quit and asked President Olafur Ragnar Grimsson to dissolve government and call a snap election instead.

But just hours later, he left it to his deputy to announce his dramatic U-turn.

Scroll down for video

Under fire: Iceland's Prime Minister Sigmundur David Gunnlaugsson speaks at the Icelandic Parliament in Reykjavik today. Gunnlaugsson made a request to dissolve government and call a snap election amid a dispute over his family's offshore tax affairs, but president Olafur Ragnar Grimsson has refused for now

Iceland's Prime Minister Sigmundur David Gunnlaugsson arrives at his residence in Reykjavik today

The Progressive party's deputy leader and Agriculture Minister Sigurdur Ingi Johannsson told Icelandic broadcaster RUV: 'The prime minister told (his party's) parliamentary group meeting that he would step down as prime minister and I will take over.'

Leaked financial documents allege that he and his wife set up a company in the British Virgin Islands with the help of a Panamanian law firm.

He is accused of a conflict of interest for failing to disclose his involvement in the company, which held interests in failed Icelandic banks that his government was responsible for overseeing.

Gunlaugsson has said earlier today that he may dissolve parliament and call new elections if he were to lose the support of his junior coalition partner following an uproar over his offshore holdings revealed in the Panama Papers.

'I told the leader of the Independence Party that if the party's parliamentarians think they cannot support the government in completing joint tasks, I would dissolve parliament and call a general election,' Prime Minister Sigmundur David Gunnlaugsson wrote on his Facebook page.

Gunnlaugsson, 41, has been under pressure to resign since leaked financial documents showed that he and his wife Anna Sigurlaug Palsdottir owned an offshore company in the British Virgin Islands.

The leftwing opposition yesterday presented a motion of no-confidence against Gunnlaugsson, which could be voted on as early as this week.

Thousands gathered in the centre of Reykjavik to call for the Prime Minister's resignation after the leaked Panama Papers revealing his controversial tax arrangements sparked fury in Iceland

Independence Party leader Bjarni Benediktsson, who is finance minister, was also named in the leaked 'Panama Papers'

Icelandic Minister of Finance and leader of the Icelandic Independence Party Bjarni Benediktsson (right) speaks to journalists

This protester held out a fitting sign, saying 'How to hide a billion dollar' in the wake of the shocking revelations in the Panama Papers

Independence Party leader Bjarni Benediktsson, who is finance minister, was also named in the leaked 'Panama Papers', and his party has not yet said whether it will support Gunnlaugsson.

Thousands of demonstrators protested outside parliament in Reykjavik on Monday, throwing eggs and yoghurt at the building and calling for Gunnlaugsson to step down.

Another protest was scheduled for this evening.

Gunnlaugsson's company, named Wintris Inc and acquired in 2007, was intended to manage his wife's inheritance from her wealthy businessman father, according to the Panama Papers.

The prime minister sold his 50-per cent share to his wife for a symbolic sum of $1 at the end of 2009.

But when he was elected to parliament for the first time in April 2009, as a member of the centre-right Progressive Party, he neglected to mention his stake in his declaration of shareholdings.

Yesterday, he stormed out of an interview when confronted about the issue.

When asked about Wintris by a journalist from the Swedish SVT channel, he appeared flustered before appearing to point the finger at his wife.

Icelandic prime minister Sigmundur David Gunnlaugsson storms out of an interview when asked about claims he used a secret offshore firm to hide millions of dollars while his country's banking system collapsed

Documents claim Gunnlaugsson and his wife used offshore company, Wintris Inc., to hide millions in bank bonds when Iceland's banking system crashed and its lenders had to be bailed out

He said: 'My wife sold a part in the family company. It was put in the care of a bank and the bank made some arrangement and this company was the result.

'I don't know how these things work. But everything is declared on the tax report from the beginning. And I mean what...'

Visibly irritated, he gets up and tries to leave the room, saying: 'I have never hidden assets. It's a bit like you're accusing me of something.'

He walks out but not before being pressed further on the claims as he tried to remove his microphone.

The journalist tells him: 'We know that Wintris held and holds claims in the collapsed banks. You sold your share of the company for $1 in 2009.'

He replies: 'No, no, no. You're asking me nonsense'.

His spokesman later insisted he and his wife have scrupulously followed the law.

Iceland Prime Minister Sigmundur David Gunnlaugsson with his wife Anna Sigurlaug Palsdottir. Gunnlaugsson owned a 50 per cent stake in offshore firm Wintris for more than two years, then transferred it to Pálsdottir, who held the other 50 per cent, for one dollar

Leaked documents show that he and his wife, Anna Sigurlaug Palsdottir, bought offshore company Wintris in 2007, but he did not declare an interest in the company when entering parliament two years later.

After the banking meltdown, he is said to have resisted pressure from foreign creditors - including UK customers - to repay their deposits in full because it may have affected both the Icelandic banks and the value of the bonds - which Wintris held.

The couple, who were living in the UK at the time, had been advised to set up a company in order to hold and invest substantial proceeds from the sale of Pálsdóttir's share in her family's business back in Iceland, it was reported by The Guardian.

Gunnlaugsson owned a 50 per cent stake in Wintris for more than two years, then transferred it to Palsdottir, who held the other 50 per cent, for one dollar.

He says no rules were broken and his wife did not benefit financially.

The prime minister's office later said his shareholding was an error and it had 'always been clear to both of them that the prime minister's wife owned the assets'.