Facebook shared access to user data with at least four Chinese electronics companies, including one, telecommunications firm Huawei, which has been labeled a national security threat by U.S. intelligence officials, The New York Times reported on Tuesday.

The social media company had data-sharing partnerships with Huawei, Lenovo, Oppo and TCL that date back to at least 2010, according to the report.

The agreements gave the companies private access to certain user data.

Facebook said the partnerships with the companies are still in effect but that it would end the Huawei agreement by the end of the week, according to the Times.

Deals with manufacturers such as Amazon, Apple, BlackBerry and Samsung were also disclosed to the Times in a separate report on Sunday.

These deals allowed Facebook to get an early foothold in the mobile market as far back as 2007, when Facebook apps were not commonplace on mobile devices.

The deals let device makers have Facebook features, such as address books, "like" buttons and status updates, the Times reported.

Any data shared with Huawei stayed on users' phones and didn't go to the company's servers, Facebook officials told the Times.

Nonetheless, U.S. lawmakers have advised for years that American carriers avoid buying Huawei gear.

"Facebook along with many other US tech companies have worked with [Huawei] and other Chinese manufacturers to integrate their services onto these phones," Francisco Varela, a Facebook vice president, said in a statement to The Hill. "Facebook's integrations with Huawei, Lenovo, OPPO and TCL were controlled from the get go - and we approved the Facebook experiences these companies built."

"Given the interest from Congress, we wanted to make clear that all the information from these integrations with Huawei was stored on the device, not on Huawei's servers," he added.

Huawei was able to carry out their international expansion thanks to billions of dollars in lines of credit from Chinese government-owned banks.

In recent weeks, the Trump administration has gone after Huawei and its rival, ZTE, by banning U.S. suppliers from selling to the companies.