Google has agreed to pay £130m in back taxes after an "open audit" of its accounts by the UK tax authorities.
The payment covers money owed since 2005 and follows a six year inquiry by Her Majesty's Revenue and Customs.
Google is one of several multinational companies to be have been accused of avoiding tax, in spite of making billions of pounds of sales in Britain.
Senior figures at the US search giant said it would follow new rules which would see it pay more taxes in future.
Matt Brittin, head of Google Europe, told the BBC: "Today we announced that we are going to be paying more tax in the UK.
"The rules are changing internationally and the UK government is taking the lead in applying those rules so we'll be changing what we are doing here. We want to ensure that we pay the right amount of tax."
HMRC acted after controversy over the low level of taxes paid by big companies that operate in the UK but have headquarters abroad.
Despite the UK being one of Google's biggest markets, it paid £20.4m in taxes in 2013. The value of its sales in Britain that year was £3.8bn. Google makes most of its UK profits through online advertising here.
The company has been criticised for its complex international tax structures.
Its European headquarters are in Ireland, which has a lower corporation tax rate than the UK.
It has also used company structures in Bermuda - where the corporation tax rate is zero - to shelter profits.
Such moves are legal and Google - a US business, which pays the majority of its taxes there - says it has abided by international tax rules.
The firm has now agreed to change its accounting system so that a higher proportion of sales activity is registered in Britain rather than Ireland.
It has pledged to pay more tax on those sales in the future.
It has also said that it will use a different structure to account for its profits in the UK from 2005 until 2015.
"We are paying £130m in respect of previous years when the rules were to pay in respect of profits you make in a country and then going forward we will also be paying in respect of sales to UK customers," Mr Brittin said.
Asked whether the back-payments showed Google's critics were right that the company had avoiding paying tax in the past, Mr Brittin replied: "No."
He continued: "We were applying the rules as they were and that was then and now we are going to be applying the new rules, which means we will be paying more tax.
"I think there was concern that international companies were paying only in respect of profits that they make and those were the rules and the pressure was to see us pay in respect of the sales we make to UK customers - and the same for other companies.
"So, we are making a change because we want to continue to comply with the rules and the rules are changing."
An HMRC spokesman said: "The successful conclusion of HMRC enquiries has secured a substantial result, which means that Google will pay the full tax due in law on profits that belong in the UK.
"Multinational companies must pay the tax that is due and we do not accept less."
He added that HMRC enforces tax rules regardless of the size of the company.
Google, along with other US companies such as Facebook, Amazon and Starbucks, have faced heavy criticism for their tax affairs.
Margaret Hodge, the Labour MP and former chairwoman of the Parliamentary Public Accounts Committee, described its tax structures as "devious, calculated and, in my view, unethical".
She said that Google was avoiding paying its "fair share" of tax.
John McDonnell, Labour's shadow chancellor, told BBC Radio 4's Today programme the agreement looked like a "sweetheart deal" and called for HMRC to publish full details of what it believed Google had owed.
He said people will be "sceptical" about the firm paying what he called a "relatively trivial" amount of money, saying he would raise the issue in Parliament next week.
Conservative MP Mark Garnier, a member of the Treasury select committee, said the agreement represented a "relatively small" amount of money compared with Google's UK profits.
Global tax rules have been tightened over the last year, with the Organisation for Economic Cooperation and Development (OECD), which produces guidance on world tax agreements, saying that multinational companies should not deliberately move profits to different countries to avoid tax.
"I think the international rules are quite complicated and the OECD has just gone through a big process to try to simplify them and that is why the rules are changing," Mr Brittin said.
"If we were British, we would make most of our profits in the UK and we'd be paying a lot more tax in the UK.
"The facts are we are an American company and that is where we pay the majority of our taxes, that is where we make the majority of our profits.
"But what is changing is outside the US, in international markets, we will be paying now in respect of our sales, not just our profits."
Mr Brittin also said the UK was a strong market for Google.
"I think it is right that where there is public concern and where politicians and the press are concerned about international companies - not just us - when the rules change you should change with them and we have done that," he said.
"Of course what you want to be doing as a business is focusing on building amazing products and hiring people and helping the UK make the most of the internet opportunity, and that is what we want to spend our time doing."