Google managed to avoid a hefty €1.11 billion bill from French authorities after courts decided it was not liable to pay.

After a six-year battle, parent-company Alphabet (NASDAQ:GOOGL) does not have to pay the fine of back taxes that were due for the years between 2005-2010.

French authorities said the tech giant had to pay taxes in their country due to the company selling a service for inserting online ads to several clients in France for years through its search engine.

“Google Ireland Ltd. isn’t taxable in France over the period 2005-2010,” said the court in a statement.

“The French Administrative Court of Paris has confirmed Google abides by French tax law and international standards. We remain committed to France and the growth of its digital economy.” Google said in a statement.

Despite this, courts decided that the Californian company does not have “permanent establishment” in France, and therefore does not owe the state this high amount of taxes.

Tax evasion is rife among foreign companies, who might base themselves in countries with lower taxes such as Ireland.

Last year, Alphabet paid £130 million in back taxes in the UK and will face greater tax in the future. The deal came after the company’s tax schemes were referred to as “devious, calculated and in my view unethical” by Margaret Hodge, Labour MP.

Other large companies such as Amazon (NASDAQ:AMZN) and Apple (NASDAQ:AAPL) are also under fire due to the low rates of taxes they have paid in Europe.

Just this month, the European Parliament backed new rules that will prevent multinational companies from protecting European profits in low-tax countries.

The news comes as the new French President, President Emmanuel Macron, announced plans to make France “a startup nation” and said earlier this year that he would create a 10 billion-euro fund to help finance innovation.