WASHINGTON – Defense Department officials on Wednesday ordered a broad review of the procedures used to grant security clearances to employees and contractors, acknowledging that years of escalating warning signs about Navy Yard gunman Aaron Alexis went unheeded.

Top intelligence and military officials concede that issuing millions of people security clearances for up to 10 years without regular reviews is a serious safety risk.

Alexis, a former Navy reservist who struggled with mental-health problems and other issues, used his secret-level clearance to gain access to the secure Navy Yard compound Monday, where he fatally shot a dozen people before being killed by police.

“Obviously, something went wrong,” Defense Secretary Chuck Hagel said as he announced the background-checks review, along with a separate assessment of security at U.S. military installations worldwide. “We will review everything and from that review, we would hope that we will find some answers to how we do it better.”

The handling of mental-health issues is particularly problematic because investigators rely on law enforcement agencies, employers or the employee to report concerns. It’s an especially acute issue for veterans returning from combat in Iraq and Afghanistan with symptoms of post-traumatic stress.

The Defense Department, which employs more than 3 million people, has come under criticism in recent years for not acting on warning signs that preceded a 2009 mass shooting at Fort Hood, Texas, carried out by an Army psychiatrist, and the disclosure that same year of a trove of classified diplomatic cables by an Army specialist in Iraq.

In the District of Columbia, U.S. Attorney Ronald Machen Jr.’s office is “ramping up efforts to investigate and prosecute individuals and companies that cut corners and falsify information in background checks,” according to a statement.

As part of the inquiry, federal investigators are reviewing how Alexis was granted a security clearance, a law enforcement official said.

With nearly 5 million federal workers holding secret or top-secret clearances, the government’s overburdened security clearance system struggles to keep track of those with classified access, according to current and former government officials. Agencies rely heavily on individuals or their supervisors to report disturbing behavior, tangles with law enforcement or mental-health concerns. They have few other ways to know if someone requires a second look.

An Army pilot program that began last year found that 20 percent of military and civilian personnel it scrutinized had serious issues that demanded a review of their security clearances. Some had been arrested or charged with crimes, made threatening comments about President Obama on social media, or expressed depressed or suicidal feelings. The program relied largely on law enforcement records and public websites.