The European Court of Justice said the ruling followed a procedural error by the European Commission in its veto, which paved the way for FedEx Corp to acquire TNT Express for 4.4 billion euros (£3.9 billion) in 2016, a deal it approved.

UPS, which has said it is seeking 1.74 billion euros ($1.98 billion/£1.54 billion)) from the European Commission, said it was pleased the court agreed that the company had been given a fair hearing.

"The judgment in UPS's favour makes a number of points preserving a competitive environment in Europe by clarifying the procedure and relevant criteria for merger approval," it said.

The Commission had rejected UPS's planned 5.2 billion euro acquisition of TNT, saying it had not offered enough concessions to allay concerns that the deal would hurt consumers.

The court said the Commission had infringed UPS's rights of defence by using a different econometric model in its analysis than that used in its exchange of views and arguments with UPS.

Wednesday's ruling follows that of the General Court of the European Union, the EU's second highest court, in 2017. The Commission had appealed against that ruling.

(Reporting by Philip Blenkinsop; editing by Jason Neely and Alexander Smith)