Ryanair Holdings Plc lost a bid to stop a top executive joining rival EasyJet Plc next month after a bitter legal battle.

An Irish judge ruled Chief Operating Officer Peter Bellew can join EasyJet in the same role on January 1 as planned. Ryanair had argued that Bellew must abide by a 12 month non-compete clause before moving to the U.K. carrier.

The non-compete clause in Bellew’s contract “goes beyond” what Ryanair had “shown to be justified “ and so was “void and unenforceable as an unjustified restraint of trade,” Judge Senan Allen said.

The ruling allows EasyJet to bring in a key executive from one of its closest rivals. Bellew spent a decade at Ryanair before exiting in 2014 and becoming CEO of Malaysia Airlines as it sought to recover from two fatal crashes. He returned to the Irish airline in 2017.

Ryanair has instructed its lawyers to immediately appeal this decision, an external spokesman said in an emailed statement.

EasyJet announced Bellew’s hiring in July, but Ryanair insisted that he had a stipulation in his contract that stops him working for a competitor for a year after leaving the company. Bellew denied the claim.

The case, which lasted a fortnight, saw Ryanair Chief Executive Officer Michael O’Leary criticize Bellew for alleged poor performance, while Bellew accused O’Leary of screaming and swearing at him as relations between the two men deteriorated.