Ólafur Ragnar Grímsson will not stand for election just weeks after saying he would represent stability following PM’s exit

Iceland’s longest serving president has said he will not run for a sixth term, the president’s office has said.

Monday’s announcement came after Ólafur Ragnar Grímsson, 72 – who has been president since 1996 – surprised voters last month by saying he would stand for re-election in June to provide stability and experience in the wake of prime minister Sigmundur Davíð Gunnlaugsson’s departure.

Gunnlaugsson became the first major casualty of the Panama Papers in April, stepping aside after the leaked documents showed his wife owned a company in the British Virgin Islands that held debt in Iceland’s failed banks.

Grímsson praised the exposé, which followed cooperation from Germany’s Süddeutsche Zeitung and the International Consortium of Investigative Journalists with media organisations including the Guardian, as “a great public service” and promised there would be no similar scandals involving him or his wife, the wealthy Israeli-British jewellery heiress Dorrit Moussaieff.

Last week, however, the Guardian reported that leaked documents from HSBC’s private bank in Geneva listed Moussaieff and two other members of her family – who are best known for running an exclusive jewellery shop on London’s New Bond Street – as joint owners of an offshore company, also in the British Virgin Islands.

Grímsson, who had initially announced in January that he would not be seeking to extend his 20-year term in office, has denied any knowledge of his wife’s financial affairs and – like Gunnlaugsson – insisted that neither he nor his wife had done anything illegal.

But on Monday, his office said he would not stand again after all, explaining that “the waves of protests have subsided and national affairs are now in a more traditional and peaceful channel”.

Grímsson had been comfortably ahead in opinion polls for the 25 June election. His withdrawal leaves two main candidates for the largely ceremonial role, the former centre-right prime minister and central bank governor Davíð Oddsson and the independent Guðni Jóhannesson, a historian and political scientist.