Jun Wei Yeo, an ambitious and freshly enrolled Singaporean PhD student, was no doubt delighted when he was invited to give a presentation to Chinese academics in Beijing in 2015.
His doctorate research was about Chinese foreign policy and he was about to discover firsthand how the rising superpower seeks to attain influence.
After his presentation, Jun Wei, also known as Dickson, was, according to US court documents, approached by several people who said they worked for Chinese think tanks. They said they wanted to pay him to provide "political reports and information". They would later specify exactly what they wanted: "scuttlebutt" - rumours and insider knowledge.
He soon realised they were Chinese intelligence agents but remained in contact with them, a sworn statement says. He was first asked to focus on countries in South East Asia but later, their interest turned to the US government.
That was how Dickson Yeo set off on a path to becoming a Chinese agent - one who would end up using the professional networking website LinkedIn, a fake consulting company and cover as a curious academic to lure in American targets.
Five years later, on Friday, amid deep tensions between the US and China and a determined crackdown from Washington on Beijing's spies, Yeo pleaded guilty in a US court to being an "illegal agent of a foreign power". The 39-year-old faces up to 10 years in prison.
Alumni at Singapore's Lee Kuan Yew School of Public Policy (LKYSPP), which trains some of Asia's top civil servants and government officials, were left shocked by the news that their former peer had confessed to being a Chinese agent.
"He was a very active student in class. I always viewed him as a very intelligent person," said one former postgraduate student who did not wish to be named
She said he often talked about social inequality - and that his family struggled financially when he was a child. She said she found it difficult to reconcile the person she knew with his guilty plea.
A former member of staff at the institution painted a different picture, saying Yeo seemed to have "an inflated sense of his own importance".
Yeo's PhD supervisor had been Huang Jing, a high-profile Chinese-American professor who was expelled from Singapore in 2017 for being an "agent of influence of a foreign country" that was not identified.
Huang Jing always denied those allegations. After leaving Singapore, he first worked in Washington DC, and now Beijing.
According to the court documents released with Yeo's guilty plea, the student met his Chinese handlers on dozens of occasions in different locations in China.
During one meeting he was asked to specifically obtain information about the US Department of Commerce, artificial intelligence and the Sino-US trade war.
Bilahari Kausikan, the former permanent secretary at Singapore's foreign ministry, said he had "no doubt that Dickson knew he was working for the Chinese intelligence services".
He was not, he said, "an unwitting useful fool".
Yeo made his crucial contacts using LinkedIn, the job and careers networking site used by more than 700 million people. The platform was described only as a "professional networking website" in the court documents, but its use was confirmed to the Washington Post.
Former government and military employees and contractors are not shy about publicly posting details of their work histories on the website in order to obtain lucrative jobs in the private sector.
This presents a potential goldmine to foreign intelligence agencies. In 2018, US counter-intelligence chief William Evanina warned of "super aggressive" action by Beijing on the Microsoft-owned platform, which is one of few Western social media sites not blocked in China.
Kevin Mallory, a former CIA officer jailed for 20 years last May for disclosing military secrets to a Chinese agent, was first targeted on LinkedIn.
In 2017, Germany's intelligence agency said Chinese agents had used LinkedIn to target at least 10,000 Germans. LinkedIn has not responded to a request for comment for this story but has previously said it takes a range of measures to stop nefarious activity.
Some of the targets that Yeo found by trawling through LinkedIn were commissioned to write reports for his "consultancy", which had the same name as an already prominent firm. These were then sent to his Chinese contacts.
One of the individuals he contacted worked on the US Air Force's F-35 fighter jet programme and admitted he had money problems. Another was a US army officer assigned to the Pentagon, who was paid at least $2,000 (£1,500) to write a report on how the withdrawal of US forces from Afghanistan would impact China.
In finding such contacts, Yeo, who was based in Washington DC for part of 2019, was aided by an invisible ally - the LinkedIn algorithm. Each time Yeo looked at someone's profile it would suggest a new slate of contacts with similar experience that he might be interested in. Yeo described it as "relentless".
According to the court documents, his handlers advised him to ask targets if they "were dissatisfied with work" or "were having financial troubles".
William Nguyen, an American former student at the Lee Kuan Yew school who was arrested at a protest in Vietnam in 2018 and later deported, said in a Facebook post on Saturday that Yeo had tried to contact him "multiple times" after he was released from prison and his case made headlines around the world.
In 2018, Yeo also posted fake online job ads for his consulting company. He told investigators he received more than 400 CVs with 90% of them coming from "US military and government personnel with security clearances". Some were passed to his Chinese handlers.
The use of LinkedIn is brazen, but not surprising, said Matthew Brazil, the co-author of Chinese Communist Espionage: An Intelligence Primer.
"I think lots of worldwide intelligence agencies probably use it to seek out sources of information," he said. "Because it's in everybody's interest who is on LinkedIn to put their whole career on there for everybody to see - it's an unusually valuable tool in that regard."
He said that commissioning consultant reports is a way for agents to get "a hook" into a potentially valuable source who might later be convinced to supply classified information.
"It's a modern version of classic tradecraft, really."
US Assistant Attorney General for National Security John Demers said the case was an example of how China exploits "the openness of American society" and uses "non-Chinese nationals to target Americans who never leave the United States".
Singapore, a multicultural society of 5.8 million where ethnic Chinese make up the majority of the population, has long enjoyed close links with the United States, which uses its air and naval bases. But it has also sought and maintained positive relations with China.
Mr Kausikan said that he did not believe the spying case - the first known to involve a Singaporean - would hurt the country's reputation with the American government but he feared that Singaporeans could face greater suspicion in American society.
On Sunday, Singapore's Ministry of Home Affairs said investigations had not revealed any direct threat to the country's security stemming from the case.
LKYSPP's dean, Danny Quah, wrote in an email to faculty and students quoted by the Straits Times newspaper that "no faculty or other students at our school are known to be involved" with the Yeo case.
A spokesperson at the school told the BBC that Yeo had been granted a leave of absence from his PhD in 2019 and his candidature had now been terminated.
Dickson Yeo does not appear to have got as far with his contacts as his handlers would have liked. But in November 2019, he travelled to the US with instructions to turn the army officer into a "permanent conduit of information", his signed statement says.
He was arrested before he could ask.