BT has given the green light to Ofcom‘s request to allow Openreach to become a legally separate company.

Openreach, which runs the UK’s broadband infrastructure, but will become its own entity following years of negotiations with British telecoms regulator, Ofcom. BT rivals, including Sky and TalkTalk, have made regular complaints that BT was offering poor service for high charges without enough investment.

The two companies have been disputing the separation for almost two years, and at one point the regulator threatened to take the case all the way to the European commission in Brussels.

Ofcom believed that BT was stifling competition with its an unfair advantage and wished the company to become separate from Openreach to accelerate the roll out of superfast broadband. However, BT insisted that there was no adequate safety net for the protection of the 32,000 employees’ pensions.

In order to protect these employees , new legislation will be passed by the government that underwrites BT’s £47bn retirement fund.

BT openreach splitGavin Patterson, BT Chief Executive, said: “I believe this agreement will serve the long-term interests of millions of UK households, businesses and service providers that rely on our infrastructure. It will also end a period of uncertainty for our people and support further investment in the UK’s digital infrastructure.”

“This has been a long and challenging review where we have been balancing a number of competing interests. We have listened to criticism of our business and as a result are willing to make fundamental changes to the way Openreach will work in the future.”

The agreement will see 32,000 employees transferred to Openreach, once pension arrangements have been carried out, with the company set to have its own branding, differentiating it from BT.

The telecoms regulator did threaten to force the split if BT did not comply with the changes, but Ofcom said that BT had agreed to all of its requests pertaining to concerns of unfair competition.

READ MORE: Conservative and Labour MPs unite to demand BT-Openreach split

Kester Mann, Principle Analyst, Operators, CCS Insight, said: “Today’s news provides welcome certainty after a long-running and bitter dispute over the future of the UK broadband network. Resolving it now, without having to go to Brussels to enforce a new structure, will bring much-needed stability to a UK market still reeling from the Brexit referendum.”

“The agreement reflects Ofcom’s determination to improve BT’s performance and clear concern that the UK broadband market has not been as competitive or operated as effectively as it would have liked.”

The telco’s chief executive will retain the right to veto the Openreach boss but must inform Ofcom beforehand.