The UK competition regulator has scrapped its action against Ryanair and British Airways over their failure to offer refunds to passengers prevented from flying by Covid-19 restrictions because it said a lack of legal clarity made the outcome uncertain.

During pandemic lockdowns, instead of offering refunds to those legally unable to fly, IAG-owned British Airways offered vouchers or rebooking and Ryanair provided the option to rebook.

The Competition and Markets Authority (CMA) started action against the airlines in June, saying passengers who were legally unable to take flights booked in good faith should have their money back.

But it said today the law did not provide passengers with a sufficiently clear right to a refund in such unusual circumstances, and it could not therefore justify continuing to pursue its action.

Chief executive Andrea Coscelli said the CMA "strongly believed" the passengers should be offered a full refund.

"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 case through the courts, and the uncertain outcome, can no longer justify the further expense of public money," he said.

He added the CMA hoped the law would be clarified.

Ryanair said it welcomed the decision to close the investigation.

"We operated a limited schedule during UK lockdowns for customers who travelled for essential reasons," a spokesperson said.

"Passengers had the option to change their bookings without paying the flight change fee and many availed of this option," the airline added.

British Airways said in a statement it had acted lawfully at all times during the crisis, issuing nearly 4 million refunds and offering highly flexible booking policies.

"We're grateful for (our customers') support at a time when we've been navigating dynamic and fast-changing travel restrictions to maintain a limited schedule," it said.