Facebook wielded its users’ data as a bargaining chip to squash potential competitors and tried to frame the move publicly as one made to protect privacy, leaked emails have revealed.

The near-7,000 pages of internal Facebook communications are from the early 2010s and come from a lawsuit filed by start-up Six4Three in 2015 over alleged anti-competitive behaviour by the tech giant.

The emails have now been leaked publicly, and show high-level Facebook executives discussing restricting access to user access to potential competitors, providing more data to companies that buy ads on the platform and spinning the new policies as a move to protect user data.

At the time, Facebook publicly claimed it was neutral and provided all apps on its platform equally access to user data.

In 2015, the company announced changes restricting access to user data.

The emails reveal discussions leading up to this change, and how the company was already cutting off access to companies viewed as competitors, along with how it spun the changes publicly.

In one of the emails, a Facebook executive divided up the companies looking to access user data into “three buckets” consisting of “existing competitors, possible future competitors [and] developers that we have alignment with on business models.”

They went on to discuss restricting access to the first two categories and providing preferential access to the third category if they agreed to make advertising purchases on the site or make a reciprocal data-sharing deal with Facebook.

Despite publicly stating that it was a neutral platform and all apps had equal access to user data, behind the scenes Facebook was discussing cutting off access to potential competitors like Amazon, Twitter and YouTube.

Amazon was to have its access cut as its ‘wishlist’ service was seen to be a rival to Facebook’s Gifts app, the documents reveal.

An email said that restricting access to Facebook user data would “significantly stymie Amazon’s ability to grow the gifting app beyond users immediately connected”.

The company executives also planned to cut off Twitter from seeing its users’ friends list. But the company opted to give Apple a special data-sharing agreement, a move which troubled a senior executive at the company.

“My concern is around the perception that we can’t hold our story together,” the executive said in an email.

“We’re going all-in on the user trust message as our reasoning for doing the v4 shakeup and it’d be sad [journalists] clearly pointed out [sic] that there was an easy and obvious workaround on iOS.”

Messaging app MessageMe was cut off from accessing the data too as it was seen to be a potential competitor that was growing in popularity.

When the company decided to make the data access changes public, its executives debated how to spin the “narrative”, with a suggestion to focus on “quality and the user experience which will potentially provide a good umbrella to fold in some of the API deprecations”.

An email in 2014 to Facebook executives asked for the “Switcheroo Plan” to be reviewed, which was a “good compromise” and allowed the company to “tell a story that makes sense”. This saw Facebook announce the “bad stuff” relating to data access along with an unrelated update to the login system in an effort to spin it as being about privacy and security.

The announcement told the public that Facebook had undertaken research with users on apps and data access and had decided on the policies that would build the best trust in data privacy. But there was no mention of how the company was using its user’s data to wedge competitors and leverage its partners.

The then-director of product labelled Facebook boss Mark Zuckerberg as the “master of leverage” in the emails, while another raised concerns that the company’s data access policies were “sort of unethical”.

A Facebook spokesperson said the emails don’t paint the full picture of what was happening at the company at the time, or its policies.

“These old documents have been taken out of context by someone with an agenda against Facebook, and have been distributed publicly with a total disregard for US law,” the spokesperson said.

It’s another controversy for Facebook, which is currently facing an internal revolt over its refusal to fact-check political ads and ongoing threats to break up its various businesses, among other issues.