Special agent Michael T. Walter, 45, was fatally shot in Richmond. (Virginia State Police)

A Virginia State Police special agent and father of three was fatally shot Friday night during a vehicle stop in a crime-ridden Richmond neighborhood. Police arrested a suspect in the killing after an overnight search.

Michael T. Walter, 45, was an 18-year veteran of the state police and Marine veteran known for mentoring young people. He is survived by a wife; two sons, ages 14 and 9; and a 6-year-old daughter.

Walter died of his injuries at Virginia Commonwealth University Medical Center shortly after 5 a.m. Saturday morning.

About an hour later, state police and U.S. marshals apprehended Travis A. Ball, 27, at a home in Northumberland County, in the Northern Neck region of Virginia.

Ball is being held without bail and was charged with malicious wounding, use of a firearm in the commission of a felony and possession of a firearm by a convicted felon. Additional charges are pending, police said.

Walter was the 63rd Virginia state trooper killed in the line of duty since 1928 and the 11th in the past 11 years.

The most recent was in March 2016, when trooper Chad P. Dermyer, 37, was shot during a training exercise at the Greyhound bus station near downtown Richmond.

The shooting occurred in Mosby Court, a sprawling complex of run-down, two-story townhouses covering about a square mile — the scene of six homicides and 19 nonfatal shootings since January.

During an appearance in the neighborhood Saturday morning to address reporters and residents, Richmond Police Chief Alfred Durham announced plans to have joint patrols with state and city police in hopes of improving relations with Mosby Court residents and alleviating crime.

“At some point, we have to get it together as a people, as a community, as a city, and say, ‘We’re not going to tolerate this no more,’ ” he said.

State Police Superintendent Col. W. Steven Flaherty paid tribute to Walter for his commitment to public safety and passion for working with young people. He founded and ran a nonprofit, the Powhatan Youth Wrestling and Community Development Corp., through a local gym, he said.

“It was all about making a difference to disadvantaged youth, mentoring them, fostering them, fostering their talents through physical fitness and sportsmanship,” Flaherty said. “A lot of what he was doing here last night — he was here for this community as well.”

Flaherty said Dermyer’s widow, Michelle, “worked with Michael’s family” after the shooting.

State police gave the following account of the incident.

On Friday night, Walter was riding with a Richmond police officer when, at about 7:25 p.m., the officer and Walter saw a silver Chevrolet Cobalt pull up to the curb in the Mosby Court neighborhood.

The officer and special agent pulled in behind the car and approached it “to initiate a conversation as part of a consensual encounter,” police said.

As the Richmond officer spoke to the driver of the car, Walter walked up to the passenger side, where Ball was seated. Within moments, a shot was fired, and Ball ran.

A handgun was recovered near the car, and the investigation is ongoing. For 11 hours following the shooting, law enforcement from local, state and federal agencies conducted a search throughout the Richmond region.

Flaherty said Walter and the Richmond officer were close friends.

“I know that he’s having a very rough time, too,” Flaherty said. “It’s a difficult time for the state police family; it’s a difficult time for the Richmond law enforcement family; it’s a difficult time for the Walter family.”

A Philadelphia native, Walter served in the Marines from 1989 to 1994. He moved to Virginia to work at Virginia Commonwealth University Medical Center as a security officer and then served for two years as an officer with the Virginia Division of Capitol Police.

He graduated from the State Police Academy in 1999 and was assigned to the Fairfax Division’s office in Springfield. As a trooper, he transferred in 2005 to the Richmond Division’s Powhatan office.

A year later, he worked as a K-9 instructor at the State Police Academy. In 2010, he was promoted to special agent and assigned to the Richmond office’s drug enforcement section.

Gov. Terry McAuliffe (D) expressed condolences to Walter’s family and asked Virginians to honor his memory with gratitude for police.

“Dorothy and I are deeply saddened by the loss of Virginia State Police Special Agent Mike Walter, and we are heartbroken for his wife and children,” he said in a statement. “Special Agent Walter was one of our brave men and women in uniform who risk their lives every single day to protect their fellow Virginians. We will be forever grateful for his service and sacrifice.”

Durham, the police chief, thanked unspecified members of the community for offering tips that helped lead to the arrest.

“A lot of folks say people don’t talk. People talked,” he said. “You know why? They’re fed up, and you should be, too.”