Iceland's prime minister rose to power amid widespread populist frustration with the country's financial elite, following a devastating crisis in 2008. As a candidate, he promised to drive a hard bargain on behalf of the public with bankers and foreign investors.

Now, international media are reporting that the prime minister's wife had millions invested in the country's largest banks. While he was in office, the couple stood to gain immensely at the public's expense.

The prime minister tendered his resignation on Tuesday as protesters filled the streets of Reykjavik, giving voice to the anger and anxiety that resulted from one of the world's most severe financial crises.

Icelanders haven't forgotten their country's economic nadir in 2008, when stock markets and currency exchanges there shut down for days. The collapse in stock prices, along with rampant inflation, erased the savings of many ordinary families and put many others out of work. Before the financial sector imploded, banks' assets expanded to 10 times the size of the economy as a whole. Even as the economy has recovered in the past eight years, the protests revealed, that outrage and suspicion has hardly abated.

Watch: Iceland protesters throw eggs, shoot fireworks calling for PM's exit (The Washington Post)

At the time, the future prime minister, Sigmundur Davíð Gunnlaugsson, was reportedly sheltered from the turmoil in the Icelandic economy. He and his wife had spirited a fortune overseas -- money that remained safely abroad, according to the reports, even as the Icelandic government prevented ordinary citizens from moving their savings out of Iceland to calmer harbors.

Icelanders were all in the same boat during and after the panic -- with at least one notable exception, the reports suggest. Overall, they give the impression that Gunnlaugsson didn't have the same stake in the success of Iceland's economy as his compatriots.

Those protesters were incensed by documents published last week by a group of international journalists. The documents purportedly describe a relationship among Gunnlaugsson, a secretive Panamanian law firm and a company in the British Virgin Islands. The documents reportedly show that Gunnlaugsson and his wife, Anna Sigurlaug Pálsdóttir, used the firm in the Virgin Islands to invest money abroad.

The Washington Post has not reviewed the documents, published by the International Consortium of Investigative Journalists, or confirmed their authenticity. The documents do not provide clear evidence of lawbreaking, and both Gunnlaugsson and the law firm in Panama City, Mossack Fonesca, have said that they did not do anything illegal.

It isn't immediately clear from the consortium's report how Gunnlaugsson would have benefited from the arrangement financially. However, he could have used his position as prime minister to improve the value of his wife's investments in Icelandic banks under state control, creating a potential conflict of interest.

The government nationalized and reorganized the country's three major banks beginning in October 2008. Many foreign creditors along with shareholders lost holdings when the global crisis forced the banks to fold.

Iceland was particularly exposed. Low interest rates worldwide meant that the country's economy -- which had been boring and small for many years, reliant on fishing, aluminum and tourism -- had been booming.

Foreign investors seeking fixed-income, high-yield assets invested money in Iceland's banks, which offered interest rates well above those available in better established economies.

In 2007, according to the documents, Gunnlaugsson and Pálsdóttir acquired the firm in the British Virgin Islands, which was called Wintris. Through that company, the couple reportedly invested in Icelandic banks along with many foreigners. At one point, those investments were worth about $8 million, according to the documents.

Like many other Icelanders, the future first couple apparently recorded substantial losses on those investments. It wasn't clear from the documents, however, how much Wintris had invested in foreign institutions, and to what degree the arrangement would insulate Gunnlaugsson and Pálsdóttir from the coming crisis.

When global panic engulfed financial institutions from Wall Street to Hong Kong, Iceland's banks were no longer able to secure credit from abroad. Not even the government had the resources to bail out the bloated financial sector.

Foreign investors withdrew their money from the nation's minuscule economy, selling their kronur -- Iceland's currency. Inflation set in, and the krona lost roughly 58 percent of its value against the dollar in a little over a year.

Meanwhile, Icelanders had been borrowing money cheaply from foreign banks, which were offering loans at low rates. After the crisis, they found that the krona was all but worthless for paying back what they'd borrowed in other currencies.

Gunnlaugsson became the prime minister in 2013. Iceland had recovered quickly -- thanks in part to the restrictions on moving kronur off the island, which kept money in the country's economy, and which the government has only moved to end in the past year.

Still, ordinary Icelanders were frustrated. They chose Gunnlaugsson, who had promised to drive a hard bargain with Iceland's foreign creditors in negotiations with the government over the defunct banks' debts.

The documents, however, indicate that Gunnlaugsson's own household was also among those foreign creditors, because of their investment in the Icelandic banks through Wintris. According to the reports, Gunnlaugsson did not disclose his investment, which he sold to his wife for $1 in 2009.

"Prime Minister Gunnlaugsson’s work in politics has been characterized primarily by his determination to ensure, to the extent possible, that the interests of the people of Iceland took priority over the interests of the failed banks’ claimants," a spokesman for the prime minister told the consortium that published the documents. "Both his words and all of his conduct confirm this."