Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — Russian government hackers stole highly sensitive U.S. spying tools after a contractor brought classified material home and put it on a computer that used Kaspersky anti-virus software, a former senior intelligence official briefed on the matter told NBC News.

The details were first reported Thursday by The Wall Street Journal.

The contractor, whose name has not been made public, worked for the National Security Agency, which specializes in hacking computers and eavesdropping on communications.

The Journal said the stolen material included secret details about how the NSA penetrates foreign computer networks, the computer code it uses for such spying and how it defends networks inside the U.S.

Related: U.S. to Stop Using Software From Russia-Linked Kaspersky Lab

The report also said it was unclear whether the contractor had lost his job or is facing prosecution. He is not believed to have wittingly cooperated with a foreign government.

Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

The man took his work home in violation of NSA rules, and Russian hackers were able to identify the material and access his machine because he was using Kaspersky software, the former official said.

The case explains why the U.S. government has cracked down on Kaspersky in recent months, banning its use by government agencies, he added.

A view of the Kaspersky Lab headquarters in Moscow on Feb. 1, 2017. Kaspersky Lab is a Russian cybersecurity and anti-virus provider founded in 1997 by Eugene Kaspersky. Vyacheslav Prokofyev / TASS via Getty Images file

Kaspersky is an anti-virus company owned by Eugene Kaspersky, who has long been accused by U.S. officials of having ties with Russian intelligence officials. But until recently, the company's products were widely for sale in the U.S. and used by some federal agencies.

The loss of secrets is "extremely damaging," the former official said, because it offers Russia great insights into how the NSA steals data. It will make the NSA's job harder.

"Not only is the work of the NSA and CIA increasingly visible, there is a certain aggression implied by this," he said. "It's a 'game-on' moment."

Kaspersky, he said, should be treated as a hostile actor.

Kaspersky said in a statement to NBC News that it could neither confirm nor deny the incident.

"Kaspersky Lab has not been provided any evidence substantiating the company’s involvement in the alleged incident," the statement said. "It is unfortunate that news coverage of unproven claims continues to perpetuate accusations about the company. As a private company, Kaspersky Lab does not have inappropriate ties to any government, including Russia, and the only conclusion seems to be that Kaspersky Lab is caught in the middle of a geopolitical fight."

Eugene Kaspersky, founder and chief executive officer of Kaspersky Lab, poses for a photograph at his office in Moscow on Dec. 9, 2014. Alexander Zemlianichenko Jr. / Bloomberg via Getty Images file

Another NSA contractor, Harold Martin, has been charged with taking home classified material without permission. He had pleaded not guilty, and he is not the person implicated in this case, the former official said.

A third contractor, Edward Snowden, famously removed reams of classified information NSA facilities and leaked it to the news media. But Snowden for the most part did not reveal spying tools, so the current case could in some ways prove more damaging.

Sen. Ben Sasse, R-Neb., a member of the Armed Services Committee, said the NSA "needs to get its head out of the sand and solve its contractor problem. Russia is a clear adversary in cyberspace and we can’t afford these self-inflicted injuries."

An NSA spokesman declined to comment. An agency official who asked not to be named said the NSA is committed to improving its internal security.

Sen. Jeanne Shaheen, a New Hampshire Democrat, called on the Trump administration to declassify information about what she called the dangers of Kaspersky software.

"This development should serve as a stark warning, not just to the federal government, but to states, local governments, and the American public, of the serious dangers of using Kaspersky software," Shaheen said. “The strong ties between Kaspersky Lab and the Kremlin are extremely alarming and have been well-documented for some time. It’s astounding and deeply disturbing that the Russian government continues to have this tool at their disposal to harm the United States."