The Chinese telecoms giant Huawei is to spend $2bn (£1.5bn) in an effort to alleviate British security services’ concerns about vulnerabilities in its products, capping a torrid week for the firm.

In July, a British government centre established to verify the integrity of Huawei’s technology warned that it had security concerns about the company’s technology and could only provide “limited assurance” that risks to national security had been mitigated.

On Thursday BT confirmed it was removing Huawei equipment from key areas of its 4G network over concerns about the Chinese firm’s presence in critical telecoms infrastructure.

Both Huawei and the government declined to dispute the details of reports in the Financial Times and Reuters that the firm intends to make the investment in an effort to address concerns over national security risks. These included technical problems which limited security researchers’ ability to check internal product codes and concerns about the security of third-party components. It is understood that the money is to be spent over five years.

On Wednesday it emerged that Meng Wanzhou, the company’s chief financial officer, had been detained in Canada and faces extradition to the US to face charges of violating sanctions. The dispute threatens to derail talks aimed at de-escalating the US-China trade war.

Separately, Alex Younger, the head of MI6, warned that the UK would have to make “some decisions” about the role of Chinese companies in the UK’s telecoms infrastructure.

“We need to decide the extent to which we are going to be comfortable with Chinese ownership of these technologies and these platforms in an environment where some of our allies have taken a very definite position,” Younger said.

Ren Zhengfei, Huawei’s founder and the father of Meng, was an officer in the People’s Liberation Army prior to setting up Huawei in 1987. The company denies any connection to the PLA and stresses that it is owned by 80,000 of its employees.

Both the company and the government emphasised that Huawei’s plan to spend $2bn was not linked to broader espionage concerns. However the firm has long faced suspicion due to Ren’s background.

In 2010 the company struck an agreement with the British government to set up the Huawei Cyber Security Evaluation Centre in Banbury, Oxfordshire, to mitigate any potential risks arising from the use of the company’s products in national infrastructure. Its work is overseen by the National Cyber Security Centre, an arm of GCHQ.

A report submitted to the British government earlier this year by the HCSEC found that there were inconsistencies in how the company’s code was interpreted by computers, and that while there was no evidence of any compromise, it could not guarantee that any risks to national security had been fully mitigated.

A spokesperson for Huawei said: “Earlier this year the oversight board report of the HCSEC identified some areas for improvement in our engineering processes. We are grateful for this feedback and committed to addressing these issues. Cyber security remains Huawei’s top priority, and we will continue to actively improve our engineering processes and risk management systems.”

A government spokesperson said: “The National Cyber Security Centre is committed to the security of UK networks, and we have a regular dialogue with Huawei about the criteria expected of their products. As was made clear in July’s HCSEC oversight board, the NCSC has concerns around a range of technical issues and has set out improvements the company must make.

“The UK government and British telecoms operators work with Huawei to manage cyber security risks while ensuring the UK can continue to benefit from new technology.”