WASHINGTON (Reuters) - China is waging an unprecedented campaign to influence American public opinion ahead of November congressional elections and presents the greatest long-term counterintelligence threat to the United States, U.S. security officials said on Wednesday.

Senators on the Homeland Security Committee questioned Homeland Security Secretary Kirstjen Nielsen and FBI Director Christopher Wray about President Donald Trump’s assertion that China is interfering in U.S. elections and asked whether Beijing poses a larger threat to the country than Moscow.

Nielsen told the panel there were two types of threats to American election security from other nations: hacking or disruption of election infrastructure, which includes voter registration lists or voting machines, and influence campaigns.

“China absolutely is on an unprecedented - or exerting unprecedented effort to influence American opinion,” Nielsen said. “We have not seen to date any Chinese attempts to compromise election infrastructure.”

Wray went farther when asked whether China posed a larger threat than Russia, whose activities during the 2016 presidential election are the subject of a wide-ranging federal investigation that includes whether Moscow cooperated with the Trump campaign to sway the vote.

“China in many ways represents the broadest, most complicated, most long-term counterintelligence threat we face,” affecting every sector of the U.S. economy, Wray said.

“Russia is in many ways fighting to stay relevant after the fall of the Soviet Union. They’re fighting today’s fight. China’s is fighting tomorrow’s fight.”

Slideshow ( 4 images )

Trump last month accused China of seeking to meddle in the Nov. 6 congressional elections, saying Beijing did not want his Republican Party to do well because of his pugnacious stance on trade.

“China has been attempting to interfere in our upcoming 2018 election, coming up in November. Against my administration,” Trump told a U.N. Security Council meeting.

Trump made no reference to suspected Russian meddling in the 2016 election and provided no evidence for his allegation about China, which Beijing immediately rejected.

Responding to the comments at a regular news briefing in Beijing on Thursday, Chinese Foreign Ministry spokesman Lu Kang said maintaining healthy bilateral ties was in the best interests of people in both countries. He also urged the United States to take actions that benefit the relationship, rather than the opposite.

Trump has been skeptical of Russian meddling in the U.S. election and has repeatedly denied his campaign worked with Moscow to put him into the White House. He has drawn criticism from Democrats and his fellow Republicans that he is ignoring a threat to American democracy.

U.S. intelligence officials have said Russia has used widespread influence campaigns, including on social media, that target elections and has tried to hack and steal information from American candidates and officials.

Russia has repeatedly denied the allegations.