Technology giants will be forced to pay tax on the sales they generate in the UK, under new plans announced in the Budget.
Chancellor Philip Hammond plans to introduce a digital services tax from April 2020 following a consultation.
He said "established tech giants" will be targeted rather than start-ups.
Companies such as Amazon and Facebook have been criticised for the small amount of tax they pay in the UK.
Both the 36-member OECD and the European Commission have been trying to reach a consensus on imposing a digital tax on social media platforms, internet marketplaces and search engines.
However, Mr Hammond said that progress was "painfully slow".
He said: "It is clearly not sustainable or fair that digital platform businesses can generate substantial value in the UK without paying tax here."
What is the digital services tax?
The digital services tax is a levy against social media platforms, internet marketplaces and search engines.
The chancellor is proposing a 2% tax rate against the sales that large digital companies make in the UK.
At the moment, these firms pay taxes on UK profits, which is a much smaller figure than revenues.
The Treasury forecasts that the tax will generate £275m in 2019-20, rising to £370m in the following year.
It then expects that digital services tax receipts will reach £400m in 2021-22 and £440m the year after.
Which companies will it apply to?
Mr Hammond said that the digital services tax would be imposed on companies that are profitable and generate "at least £500m a year in global revenue".
Although he did not name them, US technology giants Amazon, Google and Facebook have been criticised for the relatively small amount of tax they pay in the UK.
Mr Hammond emphasised that start-ups would be protected from the levy.
However, Julian David, chief executive of industry body TechUK, said the proposed £500m threshold was "low" and "and risks capturing much smaller companies than anticipated".
"This approach risks undermining the UK's reputation as the best place to start a tech business or to invest," he added.
Amazon and Facebook declined to comment. Google has been contacted for comment.
When will the digital services tax be introduced?
Mr Hammond has earmarked April 2020 for the new levy.
However, it may not even go ahead if Europe moves ahead with its own digital levy which would tax firms at a 3% rate.
Zubin Patel, corporate tax partner at accountancy firm Deloitte, said: "There will be further consultation on the detail of the proposal, which is temporary and subject to formal review in 2025."
The Treasury also said earlier this year that a levy on digital companies' UK sales would be implemented until an international deal could be reached.
The OECD intends to provide an update on its plans in 2019 with the aim of producing a final report the following year.
Chris Sanger, head of tax policy at accountancy firm EY, says the fact that Mr Hammond has committed to reviewing the UK digital services tax in 2025 indicates "that he thinks that it may take quite a while for the OECD to gain any consensus on the international stage".
Europe to the rescue?
By Rory Cellan-Jones, BBC technology correspondent
Faced with public anger over the low tax paid in the UK by the likes of Google, Amazon and Facebook, the government has talked time and again of imposing some kind of levy on the tech giants.
The problem has been designing it so that it doesn't stifle innovation from new firms, as well as co-ordinating action with other countries so that businesses aren't put off investing in the UK.
The chancellor's solution is to target a digital services tax at a narrow set of what are described as digital business platform services - specifically search engines, online marketplaces and social media firms. Which sounds like Google, Amazon and Facebook.
The chancellor also makes it clear that he hopes that by 2020 when the tax is due to be introduced a global agreement on a tax on digital turnover will have been agreed.
That may be optimistic according to the trade body TechUK, which warns that going it alone would be costly.
But there is in any case still plenty to be sorted out about how the new tax will work - and whether it can be as precisely targeted as the Treasury seems to think.
The chancellor will be hoping that an international agreement rides to his rescue before the UK tax has to be imposed.
What will it mean for the UK?
Mr Hammond has been frustrated at the lack of progress internationally over introducing a digital tax and his Budget proposal shows that the UK is willing to strike out on its own.
Laurence Field, corporate tax partner at advisory firm Crowe UK, said that global firms "don't have votes, so are an easy target".
"Playing tough with the digital services tax is politically attractive even if this causes conflicts with other tax jurisdictions," he said.
However, the move could risk provoking the US at a time when the UK is trying to forge closer trade links before Brexit.
Dan Neidle, a tax partner at law firm Clifford Chance, said: "Given the dominance of the US tech giants, it is hard to see the Trump administration taking kindly to the digital sales tax as the UK sets out its stall for the best possible trade deal with the US."