The former prime minister of Iceland has been formally charged over his part in the collapse of the country's banks in 2008.

Geir Haarde was charged with failing to prevent the banking crisis and failing in his prime ministerial duty to manage the fallout. He could face two years in jail if found guilty.

Haarde, 60, who stood down as prime minister in early 2009, said the charges were "political persecution", calling for the case to be thrown out.

"I declare myself innocent of all charges and will do my utmost to prove my innocence," he told the court in Reykjavikon Tuesday.

"This whole affair is a farce, solely instigated by three members of the current parliament who have now succeeded in holding the first political trial in the country's history," he said later.

However, the court, which consists of 15 judges, ruled the case must go ahead.

Haarde is the first world leader to face criminal charges in relation to the global financial crisis, which caused the collapse of banks across the world and helped plunge the UK into recession. He is also the first person to be hauled before Iceland's Landsdomur, a criminal court created in 1905 to hear charges brought against ministers.

Last year Iceland's parliament, the Althingi, voted to indict Haarde for "economic negligence" in failing to prevent the 2008 financial crisis, which brought the country to its knees.

Haarde was charged with "violations committed from February 2008 through the beginning of October of the same year, by intent or gross neglect, mostly violations against the laws of ministerial responsibility".

Haarde, who served as prime minister between June 2006 and February 2009 and finance minister before that, was instrumental in transforming Iceland from a fishing and whaling backwater into an international financial powerhouse.

But the country's economy came crashing down almost overnight in 2008 when the banks, whose assets had swollen to nine times the tiny island's GDP, became unable to refinance their debts.

An investigation found that Haarde's government allowed Iceland's three biggest banks – Glitnir, Kaupthing and Landsbanki – to take excessive risks.

Sigrídur Fridjónsdóttir, the prosecutor, also accused Haarde of failing to properly acknowledge the crisis and not calling emergency cabinet meetings early enough. "During this period there was little discussion at ministerial meetings of the imminent danger; there was no formal discussion of it at ministerial meetings, and nothing was recorded about these matters at the meetings," the indictment states.

Haarde said the decisions he took before the crash "all turned out to be right".

However, he has conceded that his government should have acted more quickly to avert the crisis. "It probably was not responsible of us to have allowed the banks to grow this big," he said in 2008. "Maybe we should have done something sooner."

The crisis led to a diplomatic row with the UK over the failure of Icesave, Landsbanki's high-interest internet bank, which offered high-interest accounts to British savers.

The Icelandic government has been ordered to foot the £2.3bn bill to compensate Britons. British councils, universities and hospitals that invested in Icesave were also left £1bn out of pocket.

Baugur, the British retail investor, which owned stakes in House of Fraser, Debenhams and Woolworths, collapsed in the fallout of the Icelandic banks.

The International Monetary Fund (IMF) led a $4.6bn (£2.8bn) bailout of Iceland in November 2008.