In the days since a bombshell report linked Rep. Eric Swalwell, D-Calif., with a suspected Chinese spy, the congressman’s record on China has come under scrutiny.

A look at some of the California Democrat’s statements and legislative history reveals a mixed bag: at times opposing the Chinese government’s practices, but not when President Trump was involved.

“Director Ratcliffe said that China is the greatest threat, which does not match what we have been briefed on privately,” Swalwell told MSNBC’s Rachel Maddow in August, when discussing foreign election interference. While China, Iran, and Russia had all been suspected of trying to impact November’s election, Swalwell only focused on Russia, which he recognized as being the “one country that has a preference for Donald Trump.”

In May 2019, while he was in the middle of a short-lived presidential run, Swalwell called out China as a “bad actor,” but also criticized Trump for taking them on.

“I’ve seen first-hand the economic espionage that China commits and the adverse impact it has on American businesses,” Swalwell told CNBC, referring to his own experience on the House Intelligence Committee and the Judiciary Subcommittee on Courts, Intellectual Property, and the Internet. “China has not been forthright in even admitting that intellectual property theft and technology transfer occurs. Nor is China transparent on its industrial subsidies. Curbing China’s dishonest practices must be a part of any negotiation; as president, I would hold China accountable.”

In a PBS interview posted 10 days later, however, Swalwell slammed the president for his opposition to China.

“We’re in a significant trade deficit with China today. Going one on one with them in a trade war is ineffective, and the way the president is prosecuting it is incompetent,” Swalwell said.

“They’re a bad actor on intellectual property, on dumping steel, on manipulating currency,” Swalwell admitted. He then claimed, “That’s not the issue,” and focused on what he said was Trump’s failure to unite allies in opposing China.

In 2017, Swalwell knocked Trump for his strategy when it comes to North Korea, recommending talking “to experts, allies, & China.”

In past years, Swalwell has clearly opposed China on a number of issues. In 2014, he supported the World Trade Organization’s decision that said China violated international rules with their export restraints on rare earth elements. In 2016, he co-sponsored a House resolution condemning China’s dog meat festival and dog meat trade. And in October 2019 he was among lawmakers from both parties who criticized the NBA and the Houston Rockets for their pro-China statements after then-Rockets general manager Daryl Morey tweeted support for Hong Kong.

In the most recent significant issue related to China, the coronavirus pandemic, Swalwell again opted to oppose Trump, who — along with other Republicans — blamed the Chinese government for the pandemic after COVID-19 was first discovered in Wuhan. Swalwell accused those attributing the virus to China of being racist and xenophobic.

After Axios reported that a woman named Christine Fang or Fang Fang — who had helped fundraise for Swalwell in the past and placed at least one intern in his office — was a suspected Chinese spy, Swalwell implied that his criticism of Trump could have led to the story.

“I’ve been a critic of the president. I’ve spoken out against him. I was on both committees that worked to impeach him. The timing feels like that should be looked at,” Swalwell told Politico on Tuesday.

Swalwell revealed that Axios first approached him about his ties to Fang in July 2019, which was also when he ended his presidential campaign. But the Democratic lawmaker seemed to suggest that intelligence officials involved in Axios’ reporting were trying to “weaponize” his cooperation with authorities. Swalwell received a defensive briefing from investigators in 2015, and subsequently cut ties with Fang.

“What it appears though that this person — as the story reports — was unsuccessful in whatever they were trying to do. But if intelligence officials are trying to weaponize someone’s cooperation, they are essentially seeking to do what this person was not able to do, which is to try and discredit someone,” Swalwell said.