REYKJAVIK : Icelandic President Olafur Ragnar Grimsson said Monday he had changed his mind and will not stand for re-election in June, after offering to do so in April to provide stability following the prime minister's resignation.

The 72-year-old head of state, who has been president for 20 consecutive years, announced in a statement his "decision not to seek re-election" for a sixth four-year term in the June 25 vote.

Grimsson had initially announced in January that he was not going to be a candidate.

But in April he said he would seek another term in order to provide the count ry with political stability, after prime minister Sigmundur David Gunnlaugsson was pressured to resign amid mass protests over a hidden offshore account worth millions of dollars revealed by the so-called Panama Papers.

On Monday however Grimsson said "the waves of protests have subsided and the national affairs are now in a more traditional and peaceful channel" and therefore he would not be seeking a sixth term after all.

Grimsson had been the favourite in public opinion polls, after having played a calming role during the April crisis when he opposed Gunnlaugsson who wanted to dissolve parliament in haste.

Grimsson's decision to withdraw may have been influenced by recent media reports claiming that his wife, Israeli-Briton jewelry heiress Dorrit Moussaief, also held offshore accounts in the British Virgin Islands.

The couple has insisted she did nothing illegal, and maintained that they have separate finances.

Grimsson's departure from the presidential race leaves two main candidates.

Former conservative prime minister and central bank governor David Oddsson, 68, announced his candidacy on Sunday. A heavyweight in Icelandic politics, he was closely involved in the deregulation of the finance sector in the 1990s, which ultimately led to the collapse of the country's three main banks in 2008.

His rival is Gudni Johannesson, a 47-year-old historian and expert on Icelandic politics who has no party affiliation.