LONDON — With political aftershocks still being felt after the leak of the so-called Panama Papers, the European Union’s five biggest economies, including Britain and Germany, have agreed to share information on company ownership to try clamping down on tax evasion.

The deal, announced on Thursday in Washington, on the sidelines of the spring meetings of the International Monetary Fund, followed days of controversy. Disclosures in the Panama Papers led the prime minister of Iceland, Sigmundur David Gunnlaugsson, to temporarily step aside.

They have also embarrassed Britain’s prime minister, David Cameron, whose father’s name appeared among the millions of documents leaked from the Panamanian law firm Mossack Fonseca, describing the use of offshore tax havens by some of the world’s richest and most powerful people.

Another casualty of the leak emerged in Spain, where the minister of industry, energy and tourism, José Manuel Soria, quit on Friday.