Federal investigators have asked a judge in California to force Facebook to open up its financial and business records for 2010—the year that the social networking giant established a subsidiary in Ireland, largely for tax reasons.

According to a Wednesday affidavit by Internal Revenue Service agent Nina Wu Stone, Facebook failed to produce a host of documentation last month that the agency needed to understand the 2010 deal. Facebook’s move across the Atlantic was likely done in order to take advantage of a form of tax trickery known as the "Double Irish," a quirky Irish tax law arrangement that allows organizations to incorporate in Ireland but legally route money through other jurisdictions such as the Netherlands.

Facebook and many other tech firms have recently come under increased scrutiny for using this method to drastically—and legally—reduce tax burdens. The "Double Irish" was phased out in early 2015, but companies already using it have until 2020 to transition to something else.

"The IRS is just trying to get information so that it can determine if any adjustment should be made to Facebook’s taxable income," Andrew Mitchel, a Connecticut-based tax lawyer, told Ars. "Apparently, the IRS believes that it may be able to propose a large adjustment, relating to the movement of assets from the US to Ireland, but at this stage the IRS is just trying to get information from Facebook."

If the federal judge rules against Facebook, the company could owe billions in back taxes.

A deal is a deal, right?

Agent Stone wrote:

The 2010 Agreements also purported to transfer rights to the intangible property constituting Facebook’s “online platform.” The online platform allowed users to communicate, allowed Facebook to store user information, and allowed advertiser/developers to reach those users. The 2010 Agreements also purported to license rights in “marketing intangibles” to Facebook Ireland. Finally, under the 2010 Agreements, Facebook US. and Facebook Ireland purported to share future costs to jointly develop the Facebook online platform. … The IRS examination team’s preliminary positions suggested that the [Ernst & Young] valuations of the transferred intangibles were understated by billions of dollars.

Normally such deals are supposed to be done at "arm’s length" prices, but as Bloomberg concluded, "Because the payments contribute to taxable income, the parent company has an incentive to set them as low as possible. Cutting the foreign subsidiary’s expenses effectively shifts profits overseas."

According to Stone, when the IRS ordered Facebook in January 2016 to produce various documents concerning the 2010 deal, Facebook “responded by producing only three e-mails with attachments.” The company later explained that it “narrowly construed” the IRS’ request.

When contacted for comment, Facebook spokesperson Liz Allbright deflected Ars’ questions with a canned statement: “Facebook complies with all applicable rules and regulations in the countries where we operate.”