A soldier is consoled at the memorial ceremony for the victims of the Fort Hood shooting at Fort Hood, Texas, on Wednesday, April 9, 2014.

WASHINGTON — The Army specialist who killed three soldiers at Fort Hood last week isn’t the only person from the neighborhoods that surround the massive military base near Killeen, Texas, who’s been evaluated for or diagnosed with mental illness.

Data compiled by the Department of Veterans Affairs and analyzed by McClatchy show that hundreds of veterans of the wars in Iraq and Afghanistan have been diagnosed with post-traumatic stress disorder and live near Fort Hood, while thousands more reside near the nation’s other military installations.

In fact, the communities adjacent to military bases have the highest number of veterans with post-traumatic stress disorder, a concentration that reflects the tendency of former soldiers to settle near bases once they leave the service but also raises concerns about base security.

Experts are quick to say that most veterans with PTSD or other service-connected mental ailments don’t engage in violence or other unlawful behavior, but there is an association between PTSD and elevated levels of violence.

While President Barack Obama said at Fort Hood on Wednesday that “we can never eliminate every risk,” he noted that the nation “can do more to help counsel those with mental health issues, to keep firearms out of the hands of those who are having such deep difficulties. As a military, we must continue to do everything in our power to secure our facilities and spare others this pain.”

Even as the military examines its base security procedures, experts on mental health expressed concern that the huge numbers of veterans from the recent wars could overwhelm the mental health systems that are in place to treat former soldiers.

“The system is overwhelmed taking care of all these veterans,” said Prakash Masand, the chief executive of Global Medical Education and a former consulting professor of psychiatry and behavioral sciences at Duke University Medical Center.

“When they are deployed, the Army or Navy does a pretty good job of containing them. When they come back, they have difficulty integrating back into society,” he added. “This problem is going to get much worse. The number of veterans with psychiatric illness has been much more than they anticipated.”

Masand and other experts who study PTSD stress that most war veterans don’t commit acts of violence and don’t get into legal trouble. And they, as well as veterans’ advocates, are leery of scaring the public from welcoming returning veterans.

“In every study, the vast majority of veterans with PTSD are neither violent nor criminal,” said Eric Elbogen, an associate professor at the University of North Carolina at Chapel Hill School of Medicine and a psychologist at the VA hospital in Durham, N.C. “Most of them are fine. But there is an elevated risk. All things being equal, PTSD does increase risk.”

In a study recently published in the British Journal of Psychiatry, Elbogen and his colleagues found that veterans with PTSD were more likely to commit severe violence in the year under study than those without PTSD: 20 percent compared with 6 percent. However, alcohol use was a key driver; without alcohol abuse, veterans with PTSD who were severely violent dropped from 20 to 10 percent and also reported significantly less anger and irritability.

“PTSD is relevant,” he said. “But other factors such as alcohol abuse and anger are even more relevant.”

In the study, “severe violence” was defined as getting in or threatening fights, using a knife or gun, or trying to physically force someone to have sex.

To check for the prevalence of PTSD and associated mental disorders in and around the nation’s military bases, McClatchy analyzed a database of every disability claim in the VA system. The VA’s disability compensation database, released under a Freedom of Information Act request, includes 3.2 million records of every veteran receiving disability compensation on the rolls as of 2011, when McClatchy obtained it for stories tied to the first 10 years of the wars in Afghanistan and Iraq.

The VA database doesn’t specify if somebody served in Iraq or Afghanistan. It instead counts all veterans from the first Gulf War in 1990 on as one broad “Gulf War” category. McClatchy identified an “Iraq and Afghanistan era” group of veterans who were listed as “Gulf War” and left active duty in 2003 or later, when soldiers started returning from Afghanistan and Iraq.

Of the more than 40,000 ZIP codes in the United States, ZIP code 76549, right next to Fort Hood in Killeen, has more recent veterans receiving disability compensation for PTSD than any other in the country: 288.

The second ZIP code on the list, with 273 cases, is next to Clarksville, Tenn., and Fort Campbell.

No. 3, No. 5 and No. 8 are also next to Fort Hood. Combined, those four ZIP codes next to Fort Hood represent more than 900 recent veterans already on the VA’s disability rolls for PTSD.

Other top ZIP codes are in or next to Fort Sill and Lawton, Okla.; Fort Carson and Fountain, Colo.; Fort Bragg and Fayetteville, N.C.; and Camp Lejeune and Jacksonville, N.C.

The fact that these base towns are hot spots for veterans with documented cases of PTSD — as well as other mental and physical ailments — isn’t a surprise to military experts. It simply reflects the fact that former military members often settle near the bases they’d long called home. And after a deployment — or a series of deployments — to combat zones, having the family and community support nearby is desirable.

“I’m unaware of any definitive study on this, but from personal experience, military retirees tend to congregate around the bases,” said Mark Ballesteros, a spokesman for the VA. “My friends do it; my family’s done it. They do it for any number of reasons: Access to medical facilities and commissaries are the big ones.”

Soldiers may go overseas and come back to the same base, repeatedly. They may have met their spouses in the area, bought houses, sent their kids to school.

“They have this network of folks they’ve interacted with throughout their military career,” Ballesteros said.

VA records show that an estimated 2.6 million troops have served in Iraq, Afghanistan or both since 2001. About 1.8 million of those have become eligible for veterans’ benefits after transitioning out of the military.

Of those 1.8 million, 19 percent have been in the VA’s health system for potential or provisional PTSD, according to a March VA report.

The data on PTSD disability claims are different from the number of veterans seen for PTSD in the VA’s health system. Some veterans may be seen for PTSD but never file or document full disability compensation claims, which could lead to disability payments for life.

Jacqueline Maffucci, research director for the advocacy group Iraq and Afghanistan Veterans of America, said the number of veterans with documented cases of PTSD needed to be interpreted with caution, saying that simply having PTSD doesn’t mean a veteran has an inclination toward such violence as witnessed at Fort Hood.

In addition, she said that the fact that somebody was receiving disability compensation could be seen as a positive: At least it meant they were likely getting treatment.

“I would much rather have veterans who are being diagnosed,” she said.

But whether those diagnosed cases have the medical resources in place to treat them is an open question, she said.

“If we understand where the pockets are, we can see if the community is insuring there is a network of support,” she said. “We need to be very proactive about understanding where the need is.”

