The U.S. Tax Court handed down a mixed opinion Thursday in a long-running battle between Medtronic and the Internal Revenue Service (IRS) over whether the company paid enough taxes in 2005 and 2006.

The IRS argues Medtronic owes nearly $1.4 billion for underpaying its taxes in those years by miscalculating the allocation of profits between the company's U.S. unit and its subsidiary in Puerto Rico.

Tax Court Judge Kathleen Kerrigan's decision Thursday would require Medtronic pay more than it did previously, but not as much as the IRS sought.

At the heart of the matter is an accounting practice known as "transfer pricing," which reflects what one division charges another division within the same company for goods, services and intangibles such as intellectual property.

Multinational corporations use cross-border transfer pricing as a strategy to reduce tax bills by transferring profits to lower-tax places — in this case, Puerto Rico.

According to court documents, Medtronic and the IRS were using different methods to determine the allocation of its profits. Medtronic said the royalty rate its Puerto Rico business owes the U.S. unit should be 21.8% while the IRS argued it should be 66.7%.

Kerrigan determined the royalty rate should be 48.8%, roughly splitting the difference. Her formula would increase the amount of profits credited to Medtronic US, increasing the company's tax bill.

The judge didn't calculate what Medtronic's tax bill would be under the determined rate.

Medtronic has a right to appeal the case, which has already undergone multiple appeals over the past 11 years. The company declined to say whether it planned to do so.

"We are evaluating the decision," Erika Winkels, a Medtronic spokeswoman, said late Thursday.

A representative of the IRS said that the agency does not comment on litigation.

"While [it] wasn't a complete win for the IRS, it still results in a large tax bill for Medtronic," said Alex Martin, a principal and lead on transfer pricing for KBKG, a national specialty tax firm.

"The IRS is winning more of these cases nowadays."

The case started in December 2010 when the IRS issued a "notice of deficiency" to Medtronic, stating the company owed a combined $957.6 million for tax years 2005 and 2006. In 2014, the agency revised that estimate to $1.36 billion.

Medtronic prevailed in a 2016 hearing on the case. But the U.S. Court of Appeals for the Eight Circuit reversed that decision in 2018, sending it back to the Tax Court.

Jon Choi, a professor of tax law at the University of Minnesota, said a lack of clarity in the tax code itself is a complicating factor in transfer price disputes.

"These are difficult questions. ... The law itself is not decisive about the correct method for valuation," said Choi.