Apple Italy has just agreed to pay no less than 318 million euros (347 million dollars) in order to settle a tax fraud case investigating the company for using overseas offshores to avoid taxes.

This isn’t the first time when a tech giant is accused of dodging taxes, and companies such as Microsoft, Google, and Apple itself have been involved in such investigations, but all had previously denied claims, explaining that all legal taxes were fully paid.

In Italy, however, Apple has been investigated for taxes paid between 2008 and 2013, and according to local newspaper La Repubblica, cited by Reuters, the Cupertino-based company has negotiated with state authorities and investigators for several months before reaching a deal.

Tim Cook: We pay our taxes

Apple CEO Tim Cook has recently said in an interview that his company is paying all taxes it owes, pointing that non-US activities are needed because the existing tax code could lead to bigger costs just to rely on local operations.

“We pay more taxes in this country than anyone,” Cook explains. “It would cost me 40% [taxes] to bring it home. And I don’t think that’s a reasonable thing to do. This is a tax code that was made for the industrial age, not the digital age. It’s backwards. It’s awful for America. It should have been fixed many years ago. It’s past time to get it done.”

Apple’s European operations are headquartered in Ireland, which is often described as a tax haven and currently being used by several other technology giants, including Microsoft.

Channeling sales through Ireland is a cost-effective measure for companies as compared to the United States because, in this country, the corporate tax amounts for just 12.5 percent. In the United States, it could go up to 35 percent, according to the existing tax code.