The U.S. general who was shot and killed in an apparent insider attack in Kabul on Tuesday had served in the American military for more than three decades and was a key player in the current U.S. effort to stand up Afghan security forces.

Army Maj. Gen. Harold J. Greene of Falls Church, Va., was the highest-ranking member of the U.S. military to die in the line of duty since the Sept. 11, 2001, attacks. He was the deputy commanding general for the Combined Security Transition Command-Afghanistan and was making a routine visit to a training facility when he was fatally shot.

Greene, 55, was commissioned as an engineer officer in the Army in 1980 after earning an undergraduate degree at Rensselaer Polytechnic Institute in Troy, N.Y. In addition to serving in Afghanistan, he had deployed to Iraq.

Greene’s family did not issue a statement Tuesday. But as news of his death spread to the quiet cul-de-sac where he had lived with his wife, Susan, neighbors remembered him as a fixture in the community who would go for morning runs. This past winter, the Greenes hosted the main course for the neighborhood’s holiday dinner, an annual event in which participants move from house to house for different courses.

“He was a good guy,” said retired Army Col. Duane Myers. “Harry was loved.”

Maj. Gen. Harold J. Greene. (Courtesy of the U.S. Army)

The Greenes, whose son Matthew also is in the Army, had hung a Blue Star Flag to the right of their door, like many other families with loved ones serving in the military. Their daughter, Amelia, recently graduated from Binghamton University in New York state.

On Tuesday, while military officials stayed with family members inside, another neighbor, Joanne Caramanica, took a pot of yellow chrysanthemums and left it on the front porch of the Greene home.

“We’re all shocked and saddened. They’re just lovely people,” she said. “This is a very close community. We all knew he was going overseas. We were hopeful he’d be safe.”

Greene grew up as one of three boys in Upstate New York. During his career, he received a number of advanced degrees, including a master’s degree in strategic studies from the U.S. Army War College and a doctorate from the University of Southern California.

Before his current posting, he served as the deputy for acquisition and systems management for the assistant to the secretary of the Army. He also had worked in research and development in Aberdeen, Md., and Natick, Mass.

His military awards include the Legion of Merit and the Meritorious Service Medal.

While in the Army, Greene was known for being a proponent of meshing the old with the new. To prepare a new generation of soldiers, he turned to the technology young soldiers had grown up with, such as iPads and video games, to create training tools, according to a 2011 New York Times story.

“We have to adapt to where they are,” Greene said at the time. “This is something we absolutely have to do.”

Retired Air Force Lt. Col. Nicholas Caramanica, a Vietnam-era veteran, had tears in his eyes as he considered the death of his friend and neighbor. He lamented that, like dozens of other U.S. troops who have been fatally shot in Afghanistan, Greene apparently was killed by a member of the security forces he was committed to training.

“If we’re going to fight a war, fight to win, and get out,” Caramanica said. “We have our guys walking around in uniform. The enemy is in civilian clothes, so you don’t know who is the enemy and who is not the enemy.”

Julie Tate contributed to this report.