The Defense Department has failed an audit almost three decades in the making, the Pentagon's No. 2 official said Thursday. But the results were expected and showed what the agency already knew — that "more work lies ahead of us."

Congress first required the Defense Department to undertake a comprehensive audit in 1990, but the agency didn't manage to get around to it until late last year.

"Everyone was betting against us that we would even do the audit," Deputy Defense Secretary Patrick Shanahan told reporters, adding: "It was an audit on a $2.7 trillion organization. The fact we did the audit is substantial."

The announcement came a day after the National Defense Strategy Commission, an independent agency appointed by Congress, reported that the Defense Department isn't financially or strategically set up to wage two wars at once and could even lose a war against China or Russia individually.

"The U.S. military could suffer unacceptably high casualties and loss of major capital assets in its next conflict," it said.

The audit itself and an inspector general's report on it aren't expected to be released until later Thursday at the earliest. But in a preview for reporters, Shanahan said: "We failed the audit, but we never expected to pass it."

After the briefing, a Defense Department spokesman, Army Lt. Col. Joseph Buccino, clarified in an email to Reuters that "the audit is not a 'pass-fail' process."

"We did not receive an 'adverse' finding — the lowest possible category — in any area," Buccino told Reuters. "We did receive findings of 'disclaimer' in multiple areas. Clearly more work lies ahead of us."

Shanahan said the Defense Department had been getting preliminary findings since the massive audit began — involving 1,200 auditors counting and assessing equipment, property, accounts and spending across 21 Pentagon agencies — and was already at work on taking corrective action.

Major issues the audits highlight include compliance with cybersecurity policies and improving inventory accuracy, Shanahan said. He didn't say how much money was unaccounted for.

"Some of the compliance issues are irritating to me," he said. "Some of those things frustrated me because we have a job to do; we just need to follow our procedures."

Asked whether the audit could undermine public confidence in the Defense Department, Shanahan said, "We count ships right."

He said he hoped taxpayers would conclude: "'Good. I’m glad you guys are putting in the discipline.'"