Starbucks has won a challenge against a European Union demand to pay up to €30m in Dutch back taxes.
Meanwhile, car-maker Fiat Chrysler lost a similar challenge in Luxembourg.
The European Court of Justice (ECJ) overturned a European Commission decision on state aid in favour of US coffee company Starbucks.
It found that the commission was "unable to demonstrate the existence of an advantage" in favour of the firm.
Back in 2008, tax authorities in the Netherlands concluded there was an "advance pricing arrangement" with Starbucks.
And in 2015, the commission found that that this constituted aid "incompatible with the internal market" and ordered it to be recovered.
The Netherlands disagreed, and brought an action before the ECJ.
The court found that: "In the case of tax measures, the very existence of an advantage may be established only when compared with ‘normal’ taxation and that, in order to determine whether there is a tax advantage, the position of the recipient as a result of the application of the measure at issue must be compared with his position in the absence of the measure at issue and under the normal rules of taxation."
It also said that the pricing of intra-group transactions is "not determined under market conditions.
It states that where national tax law does not make a distinction between integrated undertakings and stand-alone undertakings for corporate income tax, that law is "intended to tax the profit arising from the economic activity of such an integrated undertaking as though it had arisen from transactions carried out at market prices."
"The commission has not managed to demonstrate the existence of an economic advantage", the court ruled.
In terms of Fiat Chrysler, the European Commission said in 2015 that the tax ruling constituted state aid.
The Grand Duchy of Luxembourg and Fiat Chrysler Finance Europe (FFT) brought a court action against this finding.
But the ECJ has dismissed the actions and confirmed "the validity of the commission's decision."
It noted that, when considering whether the tax ruling complied with state aid rules, the commission did not engage in any 'tax harmonisation' - but exercised the power conferred on it by EU law by verifying whether that tax ruling conferred on its beneficiary an advantage as compared to 'normal' taxation.
The court found that the methodology approved by the tax ruling minimised Fiat Chrysler's remuneration - and the commission was therefore "fully entitled" to conclude that the tax ruling conferred an advantage to the company.
This is because it resulted in a lowering of Fiat Chrysler's tax liability as compared to the tax that it would have had to pay under Luxembourg tax law.
The cases were being watched carefully in Ireland, as they are similar in scope to the Apple tax ruling.
The State's appeal in the ruling is being heard by the EU General Court in Luxembourg.
A two year investigation by the European Commission concluded in 2016 that the Irish State allowed Apple to pay far less tax than other companies.
The commission ordered the tech giant to pay over €13bn in back taxes and interest to Ireland to make up for the shortfall.
As a result of the ruling, Ireland was forced to collect billions from Apple.
The money is being held in an escrow account until the appeals process has concluded, as Apple and the Irish State have challenged the ruling.