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 clear­ances 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 Monday to gain access to the secure Navy Yard compound, 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 problem­atic 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.

Read eyewitness accounts from the Navy Yard shooting.

The Department of Veterans Affairs said in a memorandum delivered to Congress on Wednesday that during two August visits to VA medical facilities, Alexis said was he was not depressed and was not considering harming himself or others. He told Rhode Island police earlier that month that he was hearing voices in his head, but Navy officials apparently did not do anything about it.

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, Tex., 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, U.S. Attorney Ronald C. 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 Web sites.

In the past year, the Office of the Director of National Intelligence, the agency that oversees the government’s security clearance system, has been studying how to more regularly screen people who have passed background checks.

“We all realize the security clearance process is terribly broken,” said Charles Sowell, a former senior adviser to Director of National Intelligence James R. Clapper Jr., who helped lead the effort. “The current system of checks are ineffective and unreliable.”

Gene Barlow, a spokesman for the ODNI’s Office of the National Counterintelligence Executive, acknowledged that the agency sees room for improvement.

“We do act on derogatory information that we receive, with regard to security clearances,” he said.

Anthony Roman, head of a New York risk-management and investigations firm, called the system “a house of cards.”

“It’s built with a weak foundation, and that would be a compliment,” he said.

Defense officials said Wednesday that they are developing a mechanism that would alert the Pentagon in a systematic way to troubling information about its employees from a range of sources, including local law enforcement databases.

A senior defense official said such a system would automatically “push” out relevant information about potentially dangerous employees.

“The problem we have is there is no consistent across-the-board mechanism for recording arrests around the country,” the official said during the briefing, which the Pentagon held on the condition that officials not be identified.

Mental-health issues generally come to the attention of investigators doing background checks only when people first apply for clearance and are asked to report any treatment they have received. Those who sought help for post-traumatic stress resulting from combat, or for marital or grief counseling, are exempted.

Once individuals are cleared for classified access, any mental-health problems they experience only rise to the attention of security officials if they are reported by law enforcement agencies, supervisors or the employee.

“The system is based upon trust,” said Mark Riley, a former Army officer who works as a lawyer representing people appealing security clearance denials. “The idea is that you’re granting clearance to the kind of people who are going to self-report. But too many people have clearances, including a lot of people who don’t have the self-discipline to report.”

Experts in the security clearance process noted that the program is not set up to ferret out people who struggle with mental illness. Many military officials also want to be careful not to dissuade those in need of help from seeking counseling.

“The system is not designed to diagnose mental-health problems or assess the potential for violent acts,” said Marc Frey, a former senior adviser at the Department of Homeland Security who worked on personnel security matters. “It’s designed to assess your trustworthiness for handling classified information. And just because you’re depressed doesn’t mean you’re going to sell secrets to the Iranians.”

Alexis, who appeared to struggle with paranoia in the weeks leading up to the Navy Yard rampage, was required as a contractor with a security clearance to report any mental-health episodes or criminal arrests.

In August, he sought treatment for insomnia at VA medical facilities in Providence, R.I., and Washington, officials said. The department is required to alert military security officials only if a veteran or active-duty member of the military reports an intention to hurt himself or others.

House Veterans Affairs Committee Chairman Jeff Miller (R-Fla.) asked VA Secretary Eric K. Shinseki on Wednesday to turn over all records “touching in any way to Aaron Alexis” to the panel as soon as possible.

Several security-risk experts said there was a key moment when the system should have flagged Alexis: on Aug. 7, when police in Newport, R.I., alerted the Newport Naval Air Station that he was found hallucinating and in distress in a hotel room. The police said that Navy officials told them they would follow up, but that nothing indicates they did.

Experts said the report should have led the Navy to enter Alexis’s name into the military’s shared database of contractors and employees with security clearances.

“You have to applaud the Newport police for following up and alerting the Navy base,” Sowell said. “They could have just put it into the file in their records, but they went the extra mile. That is certainly information that should have made its way into the right hands in the Navy.”

On Wednesday, Hagel said the military will look at how that report should have been handled.

In addition to the internal review about security clearance procedures, which will be carried out by Deputy Defense Secretary Ashton Carter, Hagel said he will appoint an “independent panel” to examine security at military installations and screenings of people who have access to sensitive information.

“Where there are gaps, we will close them,” Hagel said. “Where there are inadequacies, we will address them. And where there are failures, we will correct them. We owe the victims, their families and all our people nothing less.”

Alice Crites, Ann E. Marimow, Julie Tate and Steve Vogel contributed to this report.