Amazon.com on Thursday won a more than $1.5 billion tax dispute with the Internal Revenue Service over transactions involving a Luxembourg unit more than a decade ago.

Judge Albert Lauber of the U.S. Tax Court rejected a variety of IRS arguments, and found that on several occasions the agency abused its discretion, or acted arbitrarily or capriciously.

Amazon's ultimate tax liability from the decision was not immediately clear.

The world's largest online retailer has said the case involved transactions in 2005 and 2006, and could boost its federal tax bill by $1.5 billion plus interest. It also said a loss could add "significant" tax liabilities in later years.

Amazon made just $2.37 billion of profit in 2016, four times what it made in the four prior years combined, on revenue of $136 billion.

Lauber's decision "should shield Amazon from potentially significant tax obligations to the IRS covering years beyond the ones covered in the lawsuit," said Colin Sebastian, an analyst at Baird Equity Research.