The shooting rampage at Fort Hood has once again focused attention on the military’s ­mental-health system, which, despite improvement efforts, has struggled to address a tide of psychological problems brought on by more than a decade of war.

Military leaders have tried to understand and deal with mounting troop suicides, worrying psychological disorders among returning soldiers, and high-profile violent incidents on military installations such as the one that left four people dead and more than 16 injured at the Army post in Texas on Wednesday.

But experts say problems persist. A nationwide shortage of mental-health providers has made it difficult for the military to hire enough psychiatrists and counselors. The technology and science for reliably identifying people at risk of doing harm to themselves or others are lacking.

Officials have yet to identify a motive behind the actions of the Fort Hood shooter, Army Spec. Ivan A. Lopez, who took his own life. But they have said he was taking medications for anxiety and depression.

Lopez had reported sustaining a traumatic brain injury and was being screened for post-traumatic stress disorder, which is thought to affect as many as 20 percent of veterans of recent wars. None of Lopez’s known issues suggest he was at risk for committing violence, and military leaders have said there were no warning signs. Lt. Gen. Mark A. Milley, the commanding general at Fort Hood, said Friday that an examination of Lopez’s record showed no combat injuries or contact with the enemy.

1 of 48 Full Screen Autoplay Close April 4, 2014 Friday April 3, 2014 Thursday April 2, 2014 Wednesday Skip Ad × Soldier argued with comrades before Fort Hood shooting rampage View Photos The 34-year-old soldier who went on a shooting rampage at Fort Hood, Tex., argued with members of his unit over an application for a leave of absence, witnesses said. Spec. Ivan A. Lopez had been undergoing treatment for depression and had seen a psychiatrist last month, but Army officials said they had not considered him a threat before he killed three fellow soldiers and took his own life. Caption The 34-year-old soldier who went on a shooting rampage at Fort Hood, Tex., argued with members of his unit over an application for a leave of absence, witnesses said. Spec. Ivan A. Lopez had been undergoing treatment for depression and had seen a psychiatrist last month, but Army officials said they had not considered him a threat. The Rev. Jeff Miller lights four candles, one for each of the people killed in the Fort Hood shooting, including the gunman, at the beginning of the worship service at First United Methodist Church in Killeen, Tex. Investigators say that an Army truck driver, Spec. Ivan A. Lopez, had an argument before opening fire at the Texas post on April 2, killing three soldiers, wounding 16 and then taking his own life. Jay Janner/AP Buy Photo Wait 1 second to continue.

Milley said an argument was a “direct, precipitating factor” leading to the shooting.

Experts stress that the mentally ill are more likely to be the victims of violence rather than the perpetrators and that American society, not just the military, struggles with how to handle mental illness.

Although Lopez sought treatment for his depression and anxiety, there remains in the military a stigma that prevents soldiers from seeking the help they need, said Barbara Van Dahlen, president of Give an Hour, a nonprofit group that connects troops and their families with free mental-health services.

“The military is reliant on self, focused on the other, mission first, stop whining, suck it up,” Van Dahlen said. “It’s not about self-reflection, how are you doing, I need to deal with my mental needs. It’s only in the last 10 years that the military, to its credit, started to think about, okay, we had better focus on taking care of our mental-health needs or we are going to be in trouble.”

Growing alarm about suicides and violence within the military has prompted unprecedented efforts to beef up systems to help soldiers cope with multiple deployments and adjust to life after war — and to detect latent mental illnesses that may be unleashed by military life.

Spurred by the rise in troop suicides, the Army has launched the largest-ever study of mental-health risk and resilience among military personnel. Last month, in one of the first publications from that study, researchers reported that even before they joined the military, soldiers experienced higher rates of certain mental illnesses than the general public.

In 2010, a $65 million facility opened at the Walter Reed National Military Medical Center in Bethesda, Md., devoted to treating traumatic brain injury, post-traumatic stress disorder and other psychological problems. Similar centers, set up by the nonprofit Intrepid Fallen Heroes Fund, have been opened or are planned for other military installations.

View Graphic A look at the parallels between shooting massacres at Fort Hood in Texas

The military also has started deploying psychiatrists and counselors to serve alongside soldiers in war zones and conducts therapy sessions for returned soldiers and their families.

Despite these efforts, there have been hundreds of active-duty suicides since 2011, according to figures from the Army and nonprofit groups. Wednesday’s Fort Hood shooting was just the latest in a string of violent attacks on military installations, including a mass shooting in September by a mentally disturbed man at the Washington Navy Yard.

Some advocates believe that the military has yet to treat mental-health problems with the same seriousness it gives to physical problems. They say that the military lacks adequate funding to identify and treat mental issues and that many of the diagnostic tools available inside and outside the military are outdated and inadequate.

For example, post-traumatic stress disorder is currently diagnosed using a list of questions.

“Imagine going to your doctor because you think you have a broken leg and your doctor asks 20 questions,” said retired Gen. Peter Chiarelli, a former Army vice chief of staff. “And then your doctor says, ‘You don’t have a broken leg. You can go home.’ You’d say, ‘Aren’t you going to X-ray my leg?’ That’s how we diagnose PTS.”

In his former job, Chiarelli sought to increase awareness of post-traumatic stress (which he and other members of the military do not view as a “disorder”) and to expand funding and research for mental-health issues facing troops returning from Iraq and Afghanistan.

He described the 20-question test for post-traumatic stress, set forth in the American Psychiatric Association’s Diagnostic and Statistical Manual of Mental Disorders, as a “blunt instrument.” The military, he said, needs to fund research aimed at developing more advanced tools, including brain-imaging scans and blood tests.

Chiarelli, who is chief executive of One Mind for Research, a nonprofit dedicated to curing brain disorders, said another major problem confronting the military is a lack of mental-health professionals. He said the military’s efforts to hire more clinicians to diagnose and treat post-traumatic stress have been impeded by an overall national shortage.

That, in turn, has led to an overreliance on prescription drugs instead of more time-consuming treatments, some of which involve getting patients to recall the traumatic events that fuel their condition. “It’s much easier to write a prescription for a drug than it is to sign someone up for 15 to 20 cognitive behavioral therapy sessions,” Chiarelli said.

Nonetheless, some Army officials say, the resources provided at installations such as Fort Hood are quite substantial. But the demand for them is high. Fort Hood, and the Darnall Army Medical Center on post, provides psychiatrists, psychologists and family-life chaplains to help people with anxiety, depression and post-traumatic stress.

“Could we use more? There’s always a need for more, especially after 12 years at war,” said a mental health professional at Fort Hood who spoke on the condition of anonymity because he was not authorized to speak to the news media.

Retired Army Brig. Gen. Loree Sutton, a psychiatrist who has served at Fort Hood, said: “There is no installation in the entire military that is more prepared and sadly more seasoned at these kinds of tragic events than Fort Hood. Less than five years ago, they endured another mass incident. They have learned so much and put so many measures in place.”

Soldiers should be taught self-regulation skills or techniques to track emotions, such as rage prompted by stress or fear, Sutton said, and should learn to control those emotions. Sutton, a co-founder of Threshold GlobalWorks, an organization that advocates the teaching of resilience skills, said such neurobiological approaches have shown promise.

“The tough reality is that we may find the result of this investigation, for this particular tragedy, is there may be nothing that anyone could have done,” Sutton said. “It also means that efforts to somehow place blame on the system or on the individuals within it are really not helpful at this point.”

Nakashima reported from Killeen, Tex. Rajiv Chandrasekaran, Ernesto Londoño and Christian Davenport contributed to this story.