Image copyright Police handout

US officials say China is trying to influence US policymakers, steal secrets and spy on the US government. But how? The story of Kevin Mallory, a man who seemed to lead a typical suburban life in Virginia, provides the answer.

FBI agents pointed their weapons at Jeremiah Mallory, a teenager standing in the doorway of his house one morning in June 2017, and told him to get on his knees.

"They've got guns in his face," says Patsy Clark, a family friend. They were looking for evidence against his father, Kevin Mallory, a former Central Intelligence Agency (CIA) officer who had been spying for the Chinese government.

One of Mallory's neighbours, a dog walker, was heading down the block: "All of a sudden I hear this yelling."

The roar of helicopters woke another neighbour, Delrose Winter, who says she saw police cars and black vans at the house. Cameron Norris, a student who lived nearby, saw dogs searching the yard and FBI agents carrying boxes: "They were taking equipment out - a computer."

FBI agents searched Mallory's house, a place with a red banner covered in Chinese calligraphy that hung alongside the front door, his yard and, according to neighbours, a bridle path where he used to go on runs. His street in Raspberry Falls, a Leesburg subdivision, looked like a war zone, with helicopters circling in the air and armed men charging through the grass.

Image caption At home, Mallory secretly communicated with Chinese agents

One year later Mallory, 61, was found guilty of espionage.

In a real-life episode of The Americans, a TV spy drama that takes place in northern Virginia, Mallory had lived a double life: he helped people on his street with yard work, went to church and assisted immigrants with income-tax forms. Yet at home he communicated with Chinese agents through social media and sold them US secrets.

Today he faces life in prison - and he is now awaiting sentencing. His punishment may serve as a warning to others who may be contemplating espionage, say US justice department officials. It also highlights the tense nature of the US-China relationship.

A new Cold War

The US has entered a new "cold war", said the CIA's Mike Collins, deputy assistant director at the agency's East Asia mission centre, at the Aspen Security Forum last year.

Chinese officials are investing billions of US dollars in global influence operations and espionage, according to research by a former CIA analyst, Peter Mattis.

The Chinese officials are attempting to gain inside information about the White House and the government, according to US officials, and shape the way that Beijing policies and its commercial and military activities are perceived on the world stage.

Image caption Loudoun County's Kristen Umstattd says she's concerned about Chinese broadcasting in Virginia

Chinese officials are attempting to sway the views of politicians and ordinary Americans, according to US officials, so they will support policies that are favourable to Beijing on issues ranging from the South China Sea to currency manipulation.

Last month US Assistant Attorney General John Demers testified before Congress about China's "covert efforts to influence the American public".

US Secretary of State Mike Pompeo, who previously served as CIA director, told the BBC's Gordon Corera last year that the Chinese government is trying to "infiltrate the United States with spies".

Media playback is unsupported on your device Media caption Then-CIA Director: China intent on stealing US secrets

A Chinese foreign ministry spokeswoman, Hua Chunying, said the accusations are false. "We never do such things as interference or infiltration," she said. "That is definitely not Chinese style."

In Beijing, state officials view the US with suspicion, and espionage is punished severely.

Between 2011-12, 10 individuals who were working undercover in China for the CIA were killed, according to the New York Times. "One was shot in front of his colleagues in the courtyard of a government building - a message to others," the New York Times reporters claimed, citing US officials.

Image caption Where Mallory went jogging

Meanwhile President Xi has made it clear that influence operations in other countries are a priority for his government. He has done this by expanding the efforts of the United Front Work Department, according to Xinhua, the state-run news agency.

The United Front was created in the 1930s in order to marshal forces behind the Communist Party by providing a "united front" for the party among those who are living abroad.

This means that today when Chinese students in the US publicly contradict party positions, Beijing officials may inform their family in China that they have spoken out in a "subversive" manner, according to a report, Chinese Influence and American Interests.

Chinese American students say they're singled out for scrutiny by the Beijing officials and also by US officials who suspect them of being spies.

As many as one in five Asian Americans who were accused of espionage since 2009 were never convicted, according to legal scholar Andrew Kim, the author of a May 2017 report about espionage. He showed that the rate is twice as high as that among individuals with non-Asian backgrounds.

Party officials take to the air waves

Leesburg, a town in Loudoun County, provides a textbook example of the Communist Party's mode of operations. Located 40 miles from Washington, Leesburg has old-fashioned streetlamps, brick sidewalks and picket fences, evoking authentic Americana, and seems far from global conflict.

Yet Chinese agents lured Mallory, working out of his Leesburg home, into their spy ring. Separately Chinese officials obtained access to the airwaves of a local radio station.

The Chinese officials bought access to a Leesburg station, WCRW 1190 AM, through a subsidiary company. The 50,000-watt station used to be housed in a low-slung building with plate-glass windows, but the place was sold to a family several years ago.

Image caption WCRW towers in Ashburn, shown above, broadcast programmes to Washington

Under a new style of management, WCRW transmitters were moved to Ashburn, a town closer to Washington. The radio towers are posted on property owned by a company, Loudoun Water, near an installation of China's Zigong Lantern Festival, a travelling exhibit that was open in December. "They wanted a stronger signal," says Kristen Umstattd, a local official, referring to the station owners.

A former CIA analyst who has studied in Taiwan, she says that last year the station owners received permission to expand their programming hours. A station engineer says they now broadcast 24 hours a day. "I hope somebody above my pay grade is paying attention," Umstattd says.

Image caption WCRW, once located in this building, is now known as China Radio Washington

The radio signal is powerful. On a recent Sunday, listeners in Washington learned about Chinese satellites hurling through space and other achievements of the Beijing government. In contrast the news bulletins, which are produced by China Radio International, tended to strike an ominous tone when reporting on the US economy.

In addition, Chinese officials broadcast news bulletins in Philadelphia, Atlanta and other cities, according to Reuters.

The programming of WCRW and the other stations, according to the report, Chinese Influence and American Interests, are part of what is known as the Grand External Propaganda Campaign. Chinese broadcasters say on the station that they're offering listeners in the area "perspective" and "commentary" on news and current events so that people in the US can "learn what China is thinking and saying".

A new kind of honey trap

For the Chinese agents, Mallory was a catch. He has dark brown hair, a broad smile and an easy-going manner, and he does not drink alcohol or coffee. He had worked as a covert CIA officer and held security clearances that gave him access to the nation's most valuable secrets.

By the time he was approached by the Chinese in early 2017, though, he was working as an independent consultant and was struggling to make ends meet.

Randall Phillips, an investigator with the Mintz Group, previously served as the CIA's chief representative in China. Speaking on the phone from Shanghai, he says the Chinese agents tried to make Mallory feel special. "They played with the guy's vanity," says Phillips. It's a time-honoured technique often joked about. "I keep waiting for the honey trap," one CIA official said recently in a Washington bar.

The Chinese agents approached Mallory not in a bar but on LinkedIn, saying in a casual way: "Hey, will you join my network?'"

According to court records. Mallory replied: "I'm open to whatever. I've got to - you know - pay the bills."

Image caption Mallory lived next to a golf course

They told him they were looking for someone with his professional background, the same ploy they had used on European members of parliament, according to the German domestic intelligence service.

A German official says that the Chinese agents have become more perfidious on LinkedIn over the past year. Paul Rockwell, LinkedIn's head of trust and safety department, says they're concerned about the recruitment efforts of Chinese agents: "We are committed to stopping this behaviour."

Beijing officials dispute the Germans' account, calling it "groundless".

Living the Dream

Mallory, one of nine children, graduated from university in Utah with a political science degree and spent time in the military before working as a CIA operative. He lived in Iraq, China and Taiwan and married Mariah Nan Hua in Taipei.

In 2006, they bought their house in Raspberry Falls for $1.16m, with their three children, an adopted Alaskan malamute-style puppy Misty and another husky, Sierra.

Mallory and his wife spoke Chinese at home, a place decorated with brightly coloured throw pillows, a framed picture of a Mormon tabernacle and a rice cooker resting on a kitchen counter.

His own life reflected the way Americans and native Chinese speakers have come together in northern Virginia over the years. About 14% of the population in Loudon County is Asian American, ,according to census data.

On Sundays Mallory and his wife would head to church, where he was known as Zhiping Mao. Many of their friends at church are native Chinese speakers - they sing lyrics in Chinese (you can follow the English-language version in a hymnbook) in a back room.

Image caption Leesburg has several Chinese businesses

Others at the church have a similar background to Mallory. Fluent in Chinese, these middle-aged men work for the CIA or other intelligence agencies. As one of Mallory's friends commented, "You can't swing a dead cat without hitting someone with a security clearance."

Mallory used to remind people in Raspberry Falls how lucky they are. "He'd say: 'You're living the American dream," recalls a family friend. "He'd tell people they should appreciate what they have."

Another friend, Delrose Winter, recalls a day when Mallory and his family came over for a Fourth of July barbecue. They wore red, white and blue on that Independence Day and seemed "very patriotic", she says.

But after the 2008 real estate crash, his fortunes changed. His house plummeted in value, and later he lost his job. A scientist who lives nearby, says: "They were under severe financial stress." Another neighbour says: "They were under water", adding: "That contributed to his desperation."

Image caption Mallory struggled to support his family in Raspberry Falls

Seeking access to the White House

By the time the Chinese agents got in touch with Mallory, he had $30,000 in credit card debt, according to court records, and was behind in his mortgage payments.

His new acquaintance on LinkedIn introduced him to someone who worked for the Shanghai Academy of Social Sciences, a think-tank that provides offices for scholars and cover for intelligence agents. He offered Mallory a position as a consultant.

Mallory flew to Shanghai and met his new bosses in a hotel room. These men did not say they worked for the intelligence agency, but they did not deny it either. During that meeting, the hair on Mallory's neck stood up, he later said. He had agreed to take their money, though.

"They get you to cross a line," says Phillips, the former CIA officer. "Once you do, it's harder to get out."

Mallory returned to Leesburg with a Samsung Galaxy phone the Chinese had given him - complete with a chat application by which they communicated with him.

That phone later proved to be his downfall.

When he got home, he told his wife he had concerns about his new job. Despite his reservations, though, he provided the Chinese with information he had obtained while working in the US intelligence services. According to US officials, some of the material that he gave to the Chinese was classified.

Mallory said that the agents told him: "We just want to understand what Trump administration policy is going to be."

He told the Chinese he had applied for a job in the White House, and they encouraged his efforts. The agents also prodded him for information about missile defence systems and other sensitive issues.

Image copyright US district court, Virginia Image caption Mallory placed classified material on a Toshiba SD card, shown above

But then things got really complicated for Mallory.

He texted a CIA resource officer and a covert operative, both of whom attended his church, and said he was hoping to speak to someone in the CIA's East Asia division.

He said later he was looking to tell the CIA what he was learning about the Chinese agents - effectively becoming a double agent.

These text messages began to take on a frantic tone. Psychiatrist David Charney who has interviewed several convicted spies, says they realise at a certain point they "can never go home", which can lead to deep apprehension and terror.

Mallory placed classified material that he had obtained during the time that he worked for US intelligence agencies on a Toshiba SD card, wrapping it in tinfoil and stashing in his bedroom closet.

He told the Chinese agents he was worried that US authorities would discover his subterfuge: "If they were looking for me in terms of state secrets and found the SD card we would not be talking today."

A rookie spy - and a computer glitch

Mallory's lawyers said that he did nothing wrong. They said he was simply collecting information about Chinese espionage so he could inform the CIA about Beijing's methods. He hoped to impress the CIA with his knowledge of Chinese tradecraft so the CIA would hire him back.

But prosecutors presented text messages in court as evidence that he was selling US secrets: "Your object is to gain information," he texted the Chinese agents. "My object is to be paid."

Mallory arranged to meet with a CIA official in an Ashburn hotel in May 2017. Mallory's lawyers said that he was planning to show off his knowledge of the Chinese espionage techniques. The prosecutors said Mallory wanted to speak with the CIA officials not to impress them with his knowledge but because he wanted to cover his tracks.

Mallory was clearly surprised when an FBI special agent also showed up for the meeting, as prosecutors later showed in court. The presence of the FBI agent showed that federal investigators were interested in Mallory. Still he carried on as if everything was fine. He described the way the Chinese had provided him with a secure phone. At this point, he assumed that his text messages would remain encrypted.

Image copyright US distrrict court, Virginia Image caption Mallory texted the Chinese agents on a Samsung Galaxy that they gave him

But as he spoke, the phone crashed. The messages suddenly appeared on the phone's screen while he was in the room with the FBI, revealing how he had betrayed his country. For a long moment he said nothing. James Hamrock, an engineer who examined the phone for the FBI, says that Mallory was overly trusting of the phone and of the people who gave it to him. Unbeknownst to Mallory, the software had a glitch.

Two of the counts, both relating to where he had committed the crimes, have been dropped. The government is trying to get the charges reinstated. These two charges do not affect his sentence, however: life in prison.

Mallory wrecked his own life and cast suspicion on others. Many of the native Chinese speakers who live in Loudoun County are angry. "We're American first," says Taiwan-born Eiling Chao, who runs her own company, Choice Insurance Network, with her daughter, Stephanie Chao, and other family members. "If there's any spying action happening, I certainly hope the person gets punished to the fullest."

Image caption Eiling Chao, shown with Stephanie, says the US should fight hard against espionage

A jailhouse phone call

US officials have studied the crime of espionage, creating an acronym that establishes motives: MICE (money, ideology, compromise and ego). It's true that Mallory wanted to make money from the Chinese, but in the end it was not much: he earned $25,000 USD from his spy work.

Mallory's house is now on the market: a short sale, it's listed at $740,000 and has lost more than a third of its value. The Chinese banner has been taken down. Misty and Sierra still lie on a patch of woodchips in the yard on sunny afternoons. They barely look up when a mailman comes.

Mallory is being held in the Alexandria Detention Center in Virginia, and he is waiting for his sentencing. He was in the courtroom on an autumn morning, and he wore Velcro sneakers, white socks and a prison jumpsuit, and his face was ashen.

During a phone call to his daughter from jail, he tried to explain why he had been arrested. "Your mom knows I've been all up front with all this kind of stuff with the CIA," he said and, referring to the FBI agents, said: "Somehow these other guys twisted things around a little bit." He said: "Things get complicated sometimes."

Image copyright US dstrict court, Virginia Image caption The jury wrote a note to the judge, stating their verdict

His friend Kevin McLane worked with him in Iraq and says that he is innocent. "He thought he was doing something good for the United States," says McLane. "Was he naïve? Probably. A little bit stupid? Probably. Was he trying to hurt the United States? Absolutely not."

Mallory's wife, "an absolute rock", as a friend describes her, is now driving a school bus. Jeremiah leads the church group in prayer and has the grace that comes from years of studying ballet. He is getting ready to go on a two-year missionary in Australia, following his brother, Michael, 22, who is there now. Jeremiah wrote to the court in October and asked if he could hug his father before he leaves: "It would be an unforgettable blessing to have a last moment with my Dad."

Many of the Americans who have committed treason were once model citizens who went into a downward spiral and thought espionage would help them turn things around. Behind bars they still see themselves as patriotic, says David Charney, the psychiatrist. That seems to be true with Mallory: he calls his friend Patsy Clark from jail, and she says he remains loyal to the US.

"They were never hating the US," Charney said in a Washington lecture: "Their only beef was with themselves." He added: "Weirdly enough, they're still good Americans."

You can follow Tara on Twitter and listen to her radio piece