Microsoft and a team of companies and law enforcement groups have disabled — at least temporarily — one of the world's largest hacking operations, an effort run by Russian-speaking cybercriminals that officials feared could disrupt the presidential election in three weeks.

But as soon as Microsoft began dismantling the operations last week, seeking to cripple a network of infected computers known as TrickBot that has been used to paralyze computer systems with ransomware attacks, it discovered that someone else was trying to do the same thing.

In a separate but parallel effort — which was apparently not coordinated with Microsoft — U.S. Cyber Command, the military cousin to the National Security Agency, had already started hacking TrickBot's command and control servers around the world late last month, according to two government officials.

The one-two punch painted a picture of the accelerating cyberconflict underway in the final weeks before the elections. Cyber Command, following a model it created in the 2018 midterm elections, kicked off a series of covert preemptive strikes on the Russian-speaking hackers it believes could aid President Vladimir Putin in disrupting the casting, counting and certifying of ballots this November. Meanwhile, Microsoft, Symantec and other American companies are doing the same.

TrickBot is their biggest target yet. A vast network of infected computers, known as a botnet, TrickBot has been used for actions ranging from stealing people's online banking credentials to attacking towns, cities and hospitals with ransomware, malware that locks up victims' computers until they pay a ransom, often in Bitcoin. So far, TrickBot has not been directed at voting infrastructure, officials say. But it would be well-suited to turn against the offices of the secretaries of state that certify tallies, vulnerable voter registration systems or electronic poll books, the records that allow people to vote.

"Just imagine that four to five precincts were hit with ransomware on Election Day," said Tom Burt, the Microsoft executive overseeing the team that has been dismantling TrickBot.

"Talk about throwing kerosene on this unbelievable discussion of our elections and about whether the results are valid or not," Burt said. "It would be a huge story. It would churn on forever. And it would be a huge win for Russia. They would be toasting with vodka well into the next year."

"That is a risk I want to take out," he said.

Burt said he did not know for sure where the TrickBot operators were based beyond Eastern Europe. But they are Russian-speaking and have developed their tools into a sophisticated, profitable operation. They not only infect computers but also catalog lists of infected computers and sell access to valuable systems to other cybercriminals looking to commit banking fraud or to lock them up with ransomware.

The list of victims has expanded to include cities in Florida, courts and school districts in Georgia, the Los Angeles Times, the city of New Orleans and state agencies in Louisiana — and, in recent weeks, one of the largest medical cyberattacks in U.S. history after ransomware delivered through TrickBot hijacked more than 400 hospitals run by Universal Health Services.

What connection, if any, TrickBot's operators share with the Kremlin remains an open question. But the acceleration of ransomware attacks on U.S. municipalities and government agencies has led U.S. officials and executives at Microsoft to fear that ransomware attacks will be used to lock up election systems in November, either on direct orders from a state eager to undermine American democracy or by cybercriminals who figure the urgency around the election would increase pressure on victims to pay.

In interviews late last week, when the court orders enabling Microsoft to act were still under seal, executives at the company and other firms said they had carefully timed their operations to put Russian cybercriminals on their heels weeks before the election, hoping to disrupt anything they, or the Kremlin, had planned.

"These TrickBot operators are the best," said Eric Chien, a leading researcher at Symantec who was one of the first to identify Stuxnet, the code written by the United States and Israel to attack Iran's nuclear centrifuges a decade ago. "If these tools were used in the election, in hindsight people would feel very bad. We'd ask, 'Why did we wait?' "

Cyber Command appears to have asked the same question. While the command never discusses its operations, at least in advance, its commander, Gen. Paul Nakasone, and his senior adviser, Michael Sulmeyer, wrote in Foreign Affairs in August that "we realized that Cyber Command needs to do more than prepare for a crisis in the future; it must compete with adversaries today."

According to Intel 471, a security firm, there were two attacks on the TrickBot infrastructure before Microsoft received court authorization a week ago to begin its operations. The blog Krebs on Security reported the attacks.

Those two attacks, on Sept. 22 and Oct. 1, apparently conducted by Cyber Command, infiltrated TrickBot's command and control servers and temporarily cut off cybercriminals' access to thousands of infected PCs that have been used as a primary conduit for global ransomware attacks.

Last week, several officials said the attacks appeared to be the work of Cyber Command, and the Washington Post reported the same on Friday. But experts say it is unclear if any of these operations will put the hackers behind TrickBot out of business permanently.

Instead, it may be a signal to the Kremlin that any interference will be met in kind.

The initial attacks did not last long. TrickBot's operators were able to reclaim access to their infected computers within half a day.

Microsoft's subsequent takedown effort is different, and potentially more damaging. The company asked a federal court in Virginia to force web-hosting providers to take TrickBot's operators offline, arguing that cybercriminals were violating the United States' Digital Millennium Copyright Act by using Microsoft's code for malicious purposes.

Burt said Microsoft began strategizing how to take down TrickBot as early as April but waited until October to act, fearing that an earlier move would give Russia's hackers time to regroup by November.