In this April 28, 2015, file photo, a man walks past a Microsoft sign set up for the Microsoft BUILD conference at Moscone Center in San Francisco. A federal judge says it's likely that Microsoft was trying to avoid or evade paying U.S. taxes and is ordering the company to hand over financial documents from more than a decade ago. (AP Photo/Jeff Chiu, File)

A federal judge says it's likely that Microsoft was trying to avoid or evade paying U.S. taxes and is ordering the company to hand over financial documents from more than a decade ago.

The Internal Revenue Service has been seeking the documents as part of a long-running investigation into how Microsoft structured a Puerto Rico manufacturing facility starting in 2005. The IRS has said Microsoft hired accounting firm KPMG to set up a cost-sharing arrangement with the Puerto Rican affiliate that shifted taxable revenue out of the U.S.

A ruling Friday by U.S. District Judge Ricardo Martinez says the court "finds itself unable to escape the conclusion that a significant purpose, if not the sole purpose, of Microsoft's transactions was to avoid or evade ."

The Seattle judge gave Microsoft about a week to hand over documents that the IRS has been seeking for several years. The Redmond, Washington tech company has objected to disclosing the 174 documents, saying U.S. law protects confidential communications with tax professionals.

In a statement, Microsoft said the judge's ruling was based on "" and that it had "no bearing on the validity of Microsoft's historical tax arrangements."

This April 13, 2014, file photo, shows the Internal Revenue Service headquarters building in Washington. A federal judge says it's likely that Microsoft was trying to avoid or evade paying U.S. taxes and is ordering the company to hand over financial documents from more than a decade ago. (AP Photo/J. David Ake, File)