As the San Antonio community grieved Tuesday for a veteran detective slain at a traffic stop, new details emerged on the suspect arrested in the incident, who said he "lashed out" because he was distressed over a child-custody battle.

“I’ve been through several custody battles, and I was upset at the situation I was in, and I lashed out at someone who didn’t deserve it,” Otis Tyrone McKane, 31, said as he was led by police to the Bexar County Jail late Monday after being arrested on a capital murder charge.

Detective Benjamin Marconi, 50, was conducting a routine traffic stop outside police headquarters Sunday when he was approached by a gunman while he was writing a ticket in his car. The gunman walked up to Marconi's driver's-side window, fired twice and then drove off, San Antonio Police Chief William McManus said. The vehicle that had been stopped had no role in the incident, McManus said.

A marriage license obtained by KENS-TV showed McKane was married one day later — Monday — at 9:57 a.m. at the Bexar County Courthouse, about six hours before his arrest. When McKane was arrested, he was with an unidentified woman and a 2-year-old child, KENS-TV reported.

The ambush of Marconi, a 20-year department veteran and father of two grown children, was one of four attacks Sunday in a brutal day for law enforcers. Three other officers were injured in St. Louis and Gladstone, Mo., and Sanibel, Fla. The incidents have shaken the law enforcement community during a time of heightened tensions over police-involved shootings.

Martin Chapa and Victor Garcia, who were cadets with Marconi in an ROTC battalion at Texas A&M University-Kingsville in the 1980s, hailed the character of the fallen officer.

"Ben would never allow anyone to quit," Garcia told KIII-TV.. "It was always, 'We're part of the team. We're all gonna finish together.'"

Marconi was part of the Rangers group within the ROTC department, which was an elite competition team. Both men said even with the challenges of cadet training, he was able to juggle other activities, such as involvement with the Lambda Chi Alpha fraternity.

"When he met anybody he really left an impression on you because of his leadership," Chapa told the station. "Because of his character. Because of who he was."

A friend of Marconi, Mike Bobo, told the Associated Press his buddy always did the right thing.

“You come across people in your life that will judge or demean or say things about other people jokingly or not,” Bobo said. “He would never be that person.”

Contributing: KENS-TV, KIII-TV, Associated Press