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

The Pentagon might need to spend billions to overcome the damage done to military security by Edward Snowden's release of classified intelligence documents, the chairman of the Joint Chiefs of Staff told Congress on Thursday.

And it might take two years to determine the extent of that damage, Army Gen. Martin Dempsey told a House Armed Services Committee hearing on the defense budget.

"The vast majority of the documents that Snowden – Mr. Snowden – exfiltrated from our highest levels of security, the vast majority had nothing to do with exposing government oversight of domestic activities," Dempsey said in response to a question from Rep. Mac Thornberry, R-Texas. "The vast majority of those were related to our military capabilities, operations, tactics, techniques and procedures."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Dempsey said a task force was determining precisely which military documents Snowden had and looking at ways to "mitigate the effects" of the material's release.

Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff, left and Secretary of Defense Chuck Hagel appear before a House Armed Services Committee hearing in Washington on Thursday. YURI GRIPAS / Reuters

"The mitigation task force will need to function for about two years, that's the magnitude of this challenge," Dempsey said. "And I suspect it could cost billions of dollars to overcome the loss of security that has been imposed on us."

Snowden is accused of downloading thousands of classified U.S. intelligence documents while working at a National Security Agency station in Hawaii. A news report last fall said that Snowden persuaded fellow workers to give him their passwords, and a civilian NSA employee recently resigned after being stripped of his security clearance for allowing Snowden to use his personal log-in credentials, according to an agency memo obtained by NBC News.

The material has resulted in revelations about British spy efforts in addition to those about U.S. agencies.

Snowden went to Hong Kong last May and shared documents with journalists. After the U.S. charged him with espionage in June, he flew to Moscow and is still in Russia.

— Tony Capra

Follow NBC News Investigations on Twitter and Facebook