Apple, the world’s most valuable company, finds itself once again at the center of an international controversy about the ways U.S. corporations use international tax havens to dodge their tax bills. In a detailed response to allegations published yesterday as part of the “Paradise Papers” project, Apple insisted that it pays its fair share and follows the law.

“Apple believes every company has a responsibility to pay its taxes, and as the largest taxpayer in the world, Apple pays every dollar it owes in every country around the world,” the company wrote. “We’re proud of the economic contributions we make to the countries and communities where we do business.”

As Apple has experienced astonishing success over the past decade and seen its income and profits surge, the company has also been battling ongoing allegations that it has become one of the planet’s largest tax dodgers.

Four years ago, CEO Tim Cook and other Apple executives were forced to testify in front of Congress regarding the details of their Irish tax structure, an arrangement that included several subsidiaries that had no official tax residency even though they were home to much of Apple’s overseas revenues and profits.

Apple at the time denied that this arrangement was intended to cut its tax bill. But the European Union disagreed and in 2016 ordered Ireland to collect almost $15 billion in taxes it believed Apple had failed to pay. The EU is now taking Ireland to court over the issue, saying the country has failed to act on the ruling in a timely manner.

In the meantime, according to the “Paradise Papers,” Apple was restructuring its tax structure in Ireland just as it was becoming clear that the political winds were blowing against the company. The papers are an investigative series based on files leaked from the offshore law firm Appleby and corporate services provider Estera. The revelations in those papers are being published by a consortium of media partners.

The stories say that in reorganizing its Irish tax structures, Apple retained Appleby and Estera, which together helped the company set up a new tax structure on the British island of Jersey, which is quasi-independent and sets its own tax rules.

In one email published by the consortium, the firm emphasized that Apple wanted to keep the relationship under wraps:

The report indicated that Apple moved two of its three Irish subsidies to Jersey but kept the third in Ireland, where it is leveraging new tax structures proposed by the government there that reduce taxes on intangible property. Worth noting: The reports infer much of this arrangement based on a massive swing in Irish GDP in 2015 rather than on documents that explicitly detail the scheme.

Still, since 2015, Apple’s overseas cash holding has continued to explode:

In responding to all of this, Apple said that the changes it made to its tax structure in Ireland were in response to changes in the law there and that nothing the company did reduced its tax payments.

Further, Apple said it “pays billions of dollars in taxes to the U.S. at the statutory 35 percent rate on investment income from its overseas cash.” In contrast, the stories claim that much of Apple’s overseas income is untaxed, resulting in a huge cash pile that has turned Apple into one of world’s largest investment funds. Apple seems to be saying it is paying taxes on the resulting investment profits, but that would be different from the question of taxes on the underlying revenue.

Still, Apple said its taxes paid to Ireland have increased over the last three years, totaling $1.5 billion, or about 7 percent of all corporate taxes there.

The company notes that overall it has paid $35 billion in income taxes around the world over the last three years, a figure that doesn’t include property and sales taxes it also pays. It says its 24.6 percent effective tax rate is higher than the average for U.S. multinationals. And Apple says it has set aside $36 billion in deferred taxes it would owe if it brought that money back to the U.S., perhaps as a carrot to lawmakers who are considering tax reform.

Finally, Apple repeated its call for global tax reform to simplify reporting and payment.

“Reform that allows a free flow of capital will accelerate economic growth and support job creation,” Apple wrote. “A coordinated legislative effort internationally will remove the current tug of war between countries over tax payments and ensure certainty of law for taxpayers.”