MADRID - A court on Wednesday overturned a decision by EU authorities that Real Madrid received illegal state aid in 2011, putting one of Europe's richest clubs in line for a 20 million euro windfall.

In July 2016, the European Commission determined that Real received 18.4 million euros ($20.5 million) in illegal aid from Madrid City Hall in a transaction involving municipal land.

But in Wednesday's verdict the European Union's General Court said the Commission "could not classify the disputed measure as state aid."

The club paid City Hall 595,000 euros for a parcel of land in the north of the city in 1998. But the sale never took place and, in 2011, Madrid authorities refunded the club 22.7 million euros, calculated to be the revised value of the land.

The Commission determined the actual value to be 4.3 million, concluding that City Hall had overpaid by 18.4 million euros and given the 13-times European champions an unfair advantage over other clubs.

The reversed verdict means the 18.4 million euros plus over 2 million euros in interest will be returned to the club, Real said in a statement.

In February, the European Court of Justice annulled another Commission decision regarding state aid from 2016 involving Real as well as three other Spanish clubs - Barcelona, Osasuna and Athletic Bilbao.

The Commission concluded they had paid a 25% tax rate as opposed to the standard 30% for more than two decades, and ordered them to pay up to 5 million euros in arrears.

($1 = 0.8961 euros)

(Reporting by Joseph Cassinelli; editing by John Stonestreet)