Finance ministers and tax chiefs from 51 countries signed an agreement on Wednesday to automatically swap tax information beginning in 2017.

Canada was not among the first 51 countries to agree to the effort to end tax evasion, but said it would be among 35 more countries joining the agreement in 2018. The first signatories will have to invest more over the next two years to prepare their tax departments.

“We expect this will provide tax authorities across the world with the details of billions of pounds of assets held overseas,” U.K. Finance Minister George Osborne said as countries signed the agreement in Berlin.

“Under the agreement a wide range of information will be exchanged on offshore accounts, including account balances, interest payments and beneficial ownership, and this will greatly increase the ability of governments to clamp down on tax evaders and to ensure that what they owe, they pay," he said.

The pledge from so many countries is the result of years of Organization of Economic Co-operation and Development efforts to facilitate tax authorities' access to bank data.

“It is of enormous political consequence to recover the trust that the public today has lost, after the crisis, during the crises with joblessness, with growing inequality, low growth etc., and this is something of very great consequence,” said OECD secretary general Angel Gurria.

The countries that will be the first to implement the tax-sharing agreement include most European Union nations, as well as traditional tax havens like Liechtenstein, the British Virgin Islands and the Cayman Islands. They will begin automatically exchanging data collected by financial institutions as early as 2017, the OECD said.

The U.S. has not signed, but says it will share information as part of bilateral deals including the Foreign Account Tax Compliance Act (FATCA). The act has required non-U.S. institutions to provide U.S. tax authorities with data on accounts since 2010.

Germany’s Finance Minister Wolfgang Schaueble said the agreement would end tax evasion through secret bank accounts.

Schaeuble, whose father was a tax adviser, has campaigned for the European Union to close loopholes used by multinational firms to reduce tax bills by exploiting differences in national tax rules. He is now targeting "patent boxes" that permit firms tax breaks on profits generated by patented research.

But the 72-year-old minister said he had no illusions that the ancient art of tax evasion would be consigned to history.

"The risk of being found out becomes very high. But as long as people exist, they will not all obey the law. They'll work out new ways to dodge taxes," Schaeuble said.