The £31bn merger between Virgin Media and O2 has been provisionally cleared by Britain’s competition watchdog.

First announced in May, the deal brings together O2’s 34 million mobile network customers with Virgin’s 5.3 million broadband, pay-TV and mobile users.

The Competition and Markets Authority (CMA) launched an in-depth investigation into the merger last December, citing concerns that it might mean higher prices or poorer quality for the wholesale services supplied by the companies to other network operators.

That could ultimately have led to a worse deal for consumers.

But in its provisional decision on the deal, the CMA said the presence of rivals in the market to supply “leased line” and mobile network services to other companies meant the merged company would need to stay competitive.

Martin Coleman, chairman of the CMA panel scrutinising the deal, said: “Given the impact this deal could have in the UK, we needed to scrutinise this merger closely.

“A thorough analysis of the evidence… has shown that the deal is unlikely to lead to higher prices or a reduced quality of mobile services – meaning customers should continue to benefit from strong competition.”

A joint statement from Virgin Media owner Liberty Global and Telefonica, which owns O2, said: “We continue to work constructively with the CMA to achieve a positive outcome and continue to expect closing around the middle of this year.”