In response to growing threats from Russia and other adversaries, the F.B.I. recently moved nearly 40 agents and analysts to the counterintelligence division, the senior bureau official said in an interview this month. Many of the agents will work on the Foreign Influence Task Force, a group of cyber, counterintelligence and criminal experts. Officials have made that task force, initially formed on a temporary basis before the midterm elections, permanent.

The Department of Homeland Security made its midterm election task forces permanent, folding them into an election security initiative at their National Risk Management Center. And the National Security Agency and the United States Cyber Command have also expanded and made permanent their joint task force aimed at identifying, and stopping, Russian malign influence, officials said.

Intelligence officials have said Russia has kept up its interference operations since the 2016 election. They continued through the midterms and are likely to intensify during the next presidential campaign — albeit with new tactics.

Some intelligence officials believe Russia intends to raise questions in the aftermath of future elections about irregularities or purported fraud to undermine faith in the result. During the midterm elections, Cyber Command conducted an operation to temporarily take offline the most prominent Russian troll farm to keep its operatives from mounting a disinformation operation during voting or vote counting.

Mr. Trump’s continued hostility toward discussing Moscow’s malign influence campaigns, as well as his broader attitude toward Mr. Putin and Russia, puzzles many national security experts.

“The way Trump spoke about U.S. foreign policy, with a particular focus on Russia, NATO and some other cardinal aspects of U.S. foreign policy views were out of kilter with traditional, mainstream foreign policy thinking,” said Andrew S. Weiss, a Russia expert at the Carnegie Endowment for International Peace.

During the 2016 campaign, Mr. Weiss said, Russia tried to explore what motivated Mr. Trump, to determine any advantages that Moscow could glean from his pro-Russia stance.