The psychologist who disseminated Facebook user data to an analytics firm working for the Trump campaign had a closer relationship with the social network than it has let on, co-authoring a research paper based on a massive amount of data that Facebook provided to him.

Facebook last week accused Cambridge University psychologist Aleksandr Kogan of obtaining data on at least 30 million Facebook users and inappropriately sharing it with Cambridge Analytica, the data analytics firm. Facebook has said little about Kogan besides asserting that he lied when he claimed his data-gathering would be used only for academic research.

Two of Facebook’s own data scientists worked with Kogan between 2013 and 2015, according to the paper. As part of the research, which was separate from Kogan’s work for Cambridge Analytica, Facebook provided Kogan with data on 57 billion Facebook friendships, according to the paper.

Interviews and emails between Kogan and his Cambridge Analytica colleagues, provided by Cambridge Analytica whistleblower Christopher Wylie to The Washington Post, reveal Kogan as an ambitious academic who traveled the world to lecture and made inroads in some of the most elite universities in the United States and Europe as he sought new opportunities to build more elaborate databases and profit from his work, such as by working with for-profit firms such as Cambridge Analytica.

Shortly before the contract began with the parent company of Cambridge Analytica, when he was discussing working with the company, the psychologist tried to acquire medical and genetic records of Americans to combine with troves of online data he claimed to have obtained. To that end, Kogan tried to create a partnership with Harvard Medical School and with the Harvard T.H. Chan School of Public Health to merge his data sets with medical and genetic data, according to emails.

“One of the people I met with at Harvard medical said he might be able to get us millions of medical records and also genetic data to link up to everything. Can you imagine the possibilities then?” Kogan wrote to Cambridge Analytica data scientists in a February 2014 email. “It’s going to be AMAZING.”

Two Harvard professors cited in Kogan’s emails said Kogan voiced interest in working together, but they say they never supplied him with any medical data.

In an interview Thursday, Kogan said he feels that his work for Cambridge Analytica was in full compliance with Facebook’s data policies at the time. He said he always assumed the medical data would be anonymous and was intended to be used for an academic project unrelated to his Cambridge Analytica work.

“Tech companies and developers like myself have been given a wake-up call that things we think are okay are not okay to people, and people feel angry and violated,” Kogan said. “And that is on myself, on Cambridge Analytica, on developers of that era, on Facebook, and on tech companies, because this is the culture that does exist.”

Partnerships with academics such as Kogan, 31, have been an integral part of Facebook’s broader effort to demonstrate that the social network is a potent force in society and a tool of social insight. Many academics partner with Facebook because the social network will not give them access to the data they seek unless the research is conducted jointly, and some researchers have raised concerns that Facebook is creating a conflict of interest for them.

But Kogan’s academic association with Facebook, around the same time that he was taking data to hand off to Cambridge Analytica, raises questions about how user consent was obtained, the line between academic research and corporate marketing — and how scholars can sometimes use data for commercial and political ends.

“We are strongly committed to protecting people’s information,” Facebook said in a statement. “We know there’s more that we could have done, and as [chief executive] Mark Zuckerberg said this week, we are working hard to tackle past abuse and are continuing to investigate.”

Facebook’s chief executive on Wednesday said that Cambridge Analytica’s grab led to a “breach of trust” with Facebook’s users, and that the company will investigate and audit thousands of third-party app developers.

Kogan, who is co-founder of a start-up called Philometrics, which conducts surveys, was integral to Cambridge Analytica’s obtaining at least 30 million Facebook user profiles, an issue that erupted into a crisis for Facebook last week. In 2013, he created a personality quiz app that collected Facebook profiles for an academic study. (Kogan has also published under a married name, Aleksandr Spectre.) It was from what he says was a related app that he was able to gain access to the 30 million profiles, because it included the friend networks of people who used the app.

Facebook suspended Kogan, Cambridge Analytica and Wylie last week, claiming they had illegitimately shared the data. Facebook ordered that they destroy the data. But deleting it in one database — as Facebook has asked Kogan to do — may not actually make it go away if it was shared more widely, privacy experts say. Kogan, Wylie and Cambridge Analytica say they have deleted all the data.

But Facebook had a collaboration with Kogan that was not disclosed in a company blog post describing the abuse of the company’s systems, or in a timeline that Zuckerberg posted on his Facebook wall on Wednesday.

Kogan co-authored a paper with 10 others that was funded by Cambridge University and the University of St. Petersburg in Russia in addition to Facebook. Titled “On wealth and the diversity of friendships: High social class people around the world have fewer international friends,” it studied the social ties between wealthy people around the world and was published in the journal Personality and Individual Differences in 2015.

Two Facebook data scientists were among the authors, in addition to Kogan and some prominent academics. One of the authors, Berkeley researcher Emiliana Simon-Thomas, said that Kogan had invited her to join the study but that she did not remember many details about it. The two were colleagues in the years during his doctoral studies at Berkeley.

The methodology of the study has similarities to the collection methods used when Kogan worked with Cambridge Analytica, and it also makes reference to an app built by Kogan. To conduct the study, the researchers recruited freelance workers on Amazon’s Mechanical Turk crowdsourced labor program and paid them $1 each to participate. Of that group, 857 participants authorized Kogan to gather some information from their Facebook profiles automatically, the study said.

The authors obtained the friend networks of those participants, calculating the current location and the percentage who lived outside the United States. Facebook then provided the authors with data “on every friendship formed in 2011 in every country in the world at the national aggregate level.” The data set, which was anonymized, included a total of 57,457,192,520 friendships, according to the paper.

The paper says that participants signed a consent form that detailed all parts of the study. “No deception was used,” the researchers added.

Facebook already had an agreement with the Federal Trade Commission, dating to 2011, in which Facebook promised to get people’s permissions before their data was shared. But privacy experts say Facebook’s developer policies at the time allowed programmers to access locations and other data such as relationship status, photos and likes from friends’ profiles without notifying them.

“Researchers should not have received user identified data,” said Marc Rotenberg, president and executive director of the privacy advocacy group Electronic Privacy Information Center. “The users never consented to the use of their data in this way.”

While Kogan was conducting the study with Facebook, he was also approached for more-commercial opportunities for his data.

At the time, Cambridge University colleagues who worked for Cambridge Analytica introduced Kogan to officials of the parent company, SCL, he said. He launched a company called GSR that partnered with SCL and aimed to gather a wide range of personal data, according to emails and to Kogan and Wylie.

As part of his consulting with SCL, Kogan approached Michal Kosinski, an expert in data-driven psychology who worked with Cambridge’s Psychometrics Center, to request access to the center’s popular Facebook personality database.

They began to negotiate. But Kogan’s request prompted concerns in the Psychometrics Center. In a June 2014 email, a director of Cambridge’s Psychometrics Center wrote to Cambridge Analytica chief executive Alexander Nix, who was working with Kogan, about his concerns over Cambridge Analytica gaining access to his center’s database. “The University is concerned, amongst other things, about any issues which may arise from any commercial use” of the personality data and models, which the director said were strictly for academic use.

Ultimately, Kosinski turned Kogan down, Kosinski said.

Facebook severed ties with Kogan in December 2015 and demanded that he delete the data obtained through the survey on the app. Facebook says that he deceived the company and its users when he commercialized data that was taken for legitimate research purposes and gave it to Cambridge Analytica.

Kogan says that none of the data that was taken for research purposes in 2013 was provided to Cambridge Analytica. He says that after he began working with Cambridge Analytica, he sent out a new survey to Facebook users, with new terms of service that allowed for broad uses of the data. That new survey app collected data from nearly 300,000 Facebook users and captured data on 30 million of their friends. He says he has deleted all the data that he obtained from Facebook.

'I did not offer any data'

Kogan, who was born in what was then the Soviet Union, traveled several times to Russia, where he worked with St. Petersburg university researchers and gave lectures on data and social media.

Kogan also tried to partner with other academics to make use of the online data he had obtained, emails and interviews show. He wrote to his Cambridge Analytica colleagues in February 2014 that he had met or intended to meet roughly a dozen professors from Cambridge, Harvard, Yale University and the University of California at Berkeley, and that everyone was “extremely enthusiastic” about collaborating.

Kogan wrote in the email that he wanted to create statistical models that could accurately identify people at risk for various diseases and illnesses by examining their Web browsing and purchase behaviors, and combine that with medical data from Harvard. In the emails, he said he had “sign-ons” from two professors at the schools.

Wylie, the whistleblower, told The Post on Thursday that Kogan was looking for as much data as he could find to inform research that could help model human behavior. “We were looking for a total picture, from your genes to your likes,” Wylie said.

Kogan said he went to Harvard as an academic, in the hopes of starting up a big-data institute that was separate from his work for Cambridge Analytica. He wrote the emails to SCL because the company was planning to support that effort by exchanging data sets.

One of the professors listed in Kogan’s emails was Ichiro Kawachi, chair of the Department of Social and Behavioral Sciences at the Harvard School of Public Health. He told The Post that he met Kogan in his Harvard office to discuss potentially collaborating on a project looking at how people’s use of emoticons in social media correlated with their mood.

“I did not offer any data to share, nor do I possess any medical data to share,” Kawachi said. He said that they did not work on any projects together and that he had “no idea” about Kogan’s claim of an offer from Harvard Medical School for millions of medical records.

Gil Alterovitz, a Harvard Medical School professor listed in Kogan’s email, told The Post that he was introduced to Kogan by a friend he knew from the Harvard School of Public Health, who suggested Kogan offered a potential academic collaboration. Alterovitz said he later met Kogan for lunch, where he “was surprised to hear about the size of data [Kogan] claimed to working on. It was big data. . . . I recall asking how he got the data — and thinking it was surprising that he got so much data, so quickly.”

'A conflict of interest'

In the past six years, Facebook has partnered with many academics and research institutions to examine Facebook’s effect on the world and relationships, which Facebook-backed research overwhelmingly concludes is positive.

Facebook requires researchers who want large amounts of data to partner with the social network on the research, which has presented ethical questions for researchers, said Robert Kraut, a social psychologist at Carnegie Mellon University.

“It definitely presents a conflict of interest,” he said. “In order to get access to instruments to understand the world, you need to contract with these companies. Lots of important social interactions are happening online and being captured by social media companies; the only way to understand certain elements of human behavior is with these partnerships.”

Simon-Thomas, who co-authored the international friendships study with Facebook and Kogan, said that Kogan was known as a trustworthy a researcher and mathematician and that she was surprised to see him in the news. “I would never have pinned it on him,” she said in an interview. “People want to earn more income where they can, and academics is a competitive community.”

Correction: A previous version of this story said Kogan tried to acquire medical and genetic records while working for Cambridge Analytica. Kogan tried to acquire the records shortly before he began working for Cambridge Analytica while he was in negotiations to form a partnership with Cambridge Analytica’s parent company. Also, Kogan was not an employee of Cambridge University’s Psychometrics Center, as a previous version of the story said.