The European Union has ordered France to recover €8.5m from Ryanair which it said the airline had received in illegal state aid to use Montpellier airport.

The European Commission opened an investigation last year to determine whether Ryanair had received such aid from a tourism association in southern France.

The investigation showed the association APFTE made payments that "gave Ryanair an unfair and selective advantage over its competitors and harmed other regions and regional airports," competition commisioner Margrethe Vestager said in a statement.

The commission said APFTE had struck deals between 2010 and 2017 with Ryanair "in return for promoting Montpellier and the surrounding region as a tourist destination on the Ryanair site."

The commission concluded these contracts "were financed by means of state resources and were attributable to the state," because APTFE is financed "almost entirely by regional and local French public entities."

It said the payments made on the basis of contracts "served only as an incentive for Ryanair to maintain its activities at Montpellier airport".

In April this year, Ryanair switched operations from Montpellier to nearby Beziers airport. The Irish carrier also serves other regional airports such as Nimes, Carcassonne and Perpignan.

The news comes at the end of a difficult week for the airline. 

CEO Michael O'Leary told staff on Wednesday that job cuts are "unavoidable" as a number of factors impacted its growth plans for 2020.

The airline said 900 of its pilots and cabin crew could be affected, with job losses expected to hit from this winter.

On Monday, Ryanair reported a fall in revenue, as overcapacity and a price war in Germany drove ticket prices lower.

Alongside its first quarter results, the airline warned that it could cut back its Glasgow, Edinburgh and Belfast routes in the event of a no-deal Brexit.

Earlier this month Ryanair said delays in the delivery of Boeing's 737 Max meant it would fly fewer of the aircraft than expected next year, which it said would lead to some bases being cut or closed.

In a video message to staff Mr O'Leary said the carrier currently had an excess of more than 500 pilots and about 400 flight attendants.