WASHINGTON—The Justice Department on Tuesday unveiled a new cybersecurity task force aimed in part at combating threats to the integrity of U.S. elections, as bipartisan pressure mounts in Washington for stronger countermeasures to deter future Russian and other foreign-backed campaigns targeting the vote.

Attorney General Jeff Sessions announced the creation of a Cyber-Digital Task Force that will probe ways to fight foreign interference in U.S. elections as well as deter attacks on American infrastructure, curb online terrorist recruiting and defend against cyberattacks targeting businesses and individuals.

The announcement came days after special counsel Robert Mueller indicted three Russian companies and 13 Russian citizens, alleging they were part of a sweeping, multimillion-dollar conspiracy to interfere in the U.S. election through the use of a social-media campaign replete with fake personas and U.S. rallies organized by Russians. Russia has repeatedly denied meddling in the 2016 U.S. presidential election.

The Trump administration’s top intelligence official said last week in congressional testimony that Moscow could undertake cyber-influence operations in the coming congressional elections, similar to those it stands accused of running in 2016, and that the U.S. intelligence community had already seen attempts to meddle in the 2018 elections.

President Donald Trump has been reluctant to embrace the notion that Russia interfered in the election, and at one point said he accepted Moscow’s assurances that it didn’t, drawing condemnation from critics. In a tweet Sunday, Mr. Trump wrote that he “never said Russia didn’t meddle in the election, I said “it may be Russia, or China or another country or group.”