The competition regulator has dropped its investigation into whether British Airways and Ryanair broke the law by failing to offer customers refunds who couldn’t legally take their flights because of pandemic restrictions – but said the airlines should have given them their money back.

The Competition and Markets Authority (CMA) said it is scrapping its four-month investigation due to a “lack of clarity in the law [which] makes it insufficiently certain that it would be able to secure refunds for customers”.

During periods of lockdown, when non-essential travel was banned for people in parts of the UK, the two airlines refused to give refunds to customers. Instead British Airways, which is owned by IAG, offered vouchers or rebooking, while Ryanair only offered travellers the option to rebook.

The CMA launched its investigation in June citing concerns that failing to offer refunds might have breached consumer law.

However, the regulator now says that the protracted time a court battle would take, coupled with the uncertainty of winning, meant it could no longer justify the expense pursuing the case.

“We strongly believe people who are legally prevented from taking flights due to lockdown laws should be offered a full refund and we launched this investigation in the hope that we would be able to secure a positive outcome for consumers,” said Andrea Coscelli, chief executive of the CMA.

“However, after considering the relevant law and gathering evidence in our investigation, we have concluded that the length of time that would be required to take this through the courts, and the uncertain outcome, can no longer justify the further expense of public money.”

The CMA added that given the importance of the failure to refund consumers who have “unfairly lost out” it hoped that consumer law in this area “will be clarified”.

The CMA originally opened an investigation into the airline sector in December 2020 after reports consumers were being denied refunds for flights they were not legally able to take.