The G7 group of advanced economies has reached a "historic" deal to make multinational companies pay more tax.
Finance ministers meeting in London agreed to battle tax avoidance by making companies pay more in the countries where they do business.
They also agreed in principle to a global minimum corporate tax rate of 15% to avoid countries undercutting each other.
Tech giants Amazon and Facebook are among those likely to be affected.
The deal announced on Saturday, between the US, the UK, France, Germany, Canada, Italy and Japan, plus the EU, could see billions of dollars flow to governments to pay off debts incurred during the Covid crisis.
Negotiated over many years, it will put pressure on other countries to follow suit, including at a meeting of the G20 next month, which includes China, Russia and Brazil.
US Treasury Secretary Janet Yellen told reporters that the "historic" agreement on a global minimum tax would "end the race to the bottom in corporate taxation and ensure fairness for the middle class and working people in the US around the world".
UK Chancellor of the Exchequer Rishi Sunak, who hosted the summit, said the agreement would make the global tax system "fit for the global digital age".
His German counterpart, Olaf Scholz, said it was "very good news for tax justice and solidarity and bad news for tax havens".
"Companies will no longer be in a position to dodge their tax obligations by booking their profits in lowest-tax countries," he said.
Why did they want to change the rules?
Governments have long grappled with the challenge of taxing global companies operating across many countries.
That challenge has grown with the boom in huge tech corporations like Amazon and Facebook.
At the moment companies can set up local branches in countries that have relatively low corporate tax rates and declare profits there.
That means they only pay the local rate of tax, even if the profits mainly come from sales made elsewhere. This is legal and commonly done.
The deal aims to stop this from happening in two ways.
Firstly the G7 will aim to make companies pay more tax in the countries where they are selling their products or services, rather than wherever they end up declaring their profits.
Secondly, they want a global minimum tax rate so as to avoid countries undercutting each other with low tax rates.
The right to tax is the essence of sovereign power. That is why co-ordinated international action is so difficult.
It has been the dream of campaigners and mainly European finance ministers for years. They would scarcely have believed it was possible until the past few months. But the need to fill coffers emptied by the pandemic, and the arrival of the Biden administration in the US, created a moment of opportunity.
There was, however, a big compromise to get this across the line. A minimum corporation tax rate of 15% is rather low. Although European finance ministers succeeded in including the phrase "at least 15%", which offers a path to get that number higher.
How much bite this change actually has will depend on the fine print of ongoing negotiations. Tech firms say they welcomed the move. Facebook vice president Nick Clegg said they recognised it could mean the company "paying more tax, and in different places".
And then there is the question of the rest of the world. This now goes from the G7 to the wider G20 group, including China, Russia and Brazil, and then beyond.
The German finance minister told me that the likes of Ireland, with its low corporation tax rate, now needed to "get on the train".
The Irish finance minister told me he accepted that change was coming, but he would continue to argue for legitimate tax competition.
A process has begun, a precedent has been set. It may or may not end up being transformative, but this moment is historic.
How would the agreement work?
The rules on making multinationals pay taxes where they operate - known as "pillar one" of the agreement - would apply to global companies with at least a 10% profit margin.
Twenty percent of any profit above that would be reallocated and taxed in the countries where they operate, according to the G7 communiqué.
In the case of the UK, for example, more tax revenue would be raised from large multinationals and would help pay for public services.
The second "pillar" of the agreement commits states to a global minimum corporate tax rate of 15% to avoid countries undercutting each other.
In the UK, corporation tax is already 19% and is set to rise to 25% by 2023 in response to spending during the pandemic.
Ms Yellen said there was an understanding that national digital services taxes such as those levied by the UK and EU countries would be scrapped and replaced by the new agreement. Such taxes are regarded by the US as unfairly targeting American technology giants.
"The timing remains to be worked out exactly but there is broad agreement that these two things go hand in hand," the treasury secretary said.
Asked whether Amazon and Facebook would fall under the new proposals for a global minimum corporation tax, she replied: "It will include large profitable firms and those firms, I believe, will qualify by almost any definition."
Separately, the G7 also agreed to give a commitment to make it mandatory for firms to report the climate impact of their investment decisions.
What happens next?
The agreement will be discussed in detail at a meeting of G20 finance ministers in July in Venice.
Paolo Gentiloni, the EU commissioner for the economy, described Saturday's agreement as a "big step... towards an unprecedented global agreement on tax reform" and promised the EU would "contribute actively to making that happen" in Venice.
But Irish Finance Minister Paschal Donohoe, whose country offers a low 12.5% corporate tax rate, tweeted any agreement would have to "meet the needs of small and large countries, developed and developing".
He referred to the Organisation for Economic Co-operation and Development (OECD), an intergovernmental economic organisation with 38 member countries, which promotes world trade and has been also working on updating global tax rules.
How have the corporations reacted?
A spokesperson for Amazon quoted by Reuters news agency said: "We believe an OECD-led process that creates a multilateral solution will help bring stability to the international tax system.
"The agreement by the G7 marks a welcome step forward in the effort to achieve this goal."
Facebook's Nick Clegg described the agreement as a "significant first step towards certainty for businesses and strengthening public confidence in the global tax system".
A spokesperson for Google said: "We strongly support the work being done to update international tax rules. We hope countries continue to work together to ensure a balanced and durable agreement will be finalised soon."