WASHINGTON — The U.S. accused a Russian woman Friday of a sweeping effort to sway American public opinion through social media in the first federal case alleging foreign interference in the 2018 midterm election.

The Justice Department unsealed the criminal complaint soon after U.S. intelligence agencies, in a rare public statement, asserted that Russia, China, Iran and other countries were engaged in continuous efforts to influence American policy and voters in the upcoming congressional elections and beyond.

The U.S. is concerned about the campaigns “to undermine confidence in democratic institutions and influence public sentiment and government policies,” the officials said in a joint statement. “These activities also may seek to influence voter perceptions and decision-making in the 2018 and 2020 U.S. elections.”

The two-page statement about foreign influence was issued just weeks before the Nov. 6 elections by the Office of the Department of National Intelligence, the Justice Department, the FBI and the Department of Homeland Security.

Foreign countries are using social media to amplify divisive issues in American society by sponsoring content in English-language media, such as Russia’s RT and Sputnik news outlets, the statement said. They also distribute propaganda and plant disinformation against political candidates, the departments said.

They statement did not provide specific examples of foreign interference.

The agencies said they currently do not have any evidence that voting systems have been disrupted or compromised in ways that could result in changing vote counts or hampering the ability to tally votes in the midterms, which are fewer than 20 days away.

But they said, “Some state and local governments have reported attempts to access their networks, which often include online voter registration databases, using tactics that are available to state and nonstate cyber actors.”

So far, they said, state and local officials have been able to prevent access or quickly mitigate these attempts.

President Donald Trump has often cast doubt on U.S. intelligence findings that Russia interfered with the 2016 election, as special counsel Robert Mueller investigates potential ties between Russia and Trump’s campaign.

But Trump recently accused China of meddling in the midterms, and Vice President Mike Pence said in a speech this month that Russia’s actions in 2016 pale in comparison to the covert and overt activities by China to interfere in the current elections and counter Trump’s tough trade policies against Beijing.

China has denied that it is interfering in U.S. affairs.

Russian Deputy Foreign Minister Sergei Ryabkov said recently that his country has no intention to interfere in the midterm elections in the U.S. or meddle elsewhere.