BATON ROUGE, La. — The man who killed two police officers and a sheriff’s deputy in Baton Rouge was a former Marine sergeant who served in Iraq and had no known ties to any extremist groups.

Gavin Eugene Long, whose last known address was in Kansas City, Missouri, carried out the attack Sunday on his 29th birthday. Police say he also wounded three officers before he was killed in the latest in a string of violent incidents involving police.

According to military records, Long was a Marine from 2005 to 2010 and rose to the rank of sergeant. He served in Iraq from June 2008 to January 2009, and records show he received several medals during his military career, including one for good conduct. Long, who received an honorable discharge, was listed as a “data network specialist” in the Marines.

Hilary Scheinuk, The Advocate via The Associated Press Baton Rouge Police run from the emergency room ramp as a man is taken into custody after a gun was found in his vehicle near the entrance of Our Lady Of The Lake Medical Center, Sunday, July 17, 2016, in Baton Rouge, La. Multiple law enforcement officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge. (Hilary Scheinuk/The Advocate via AP)

Gerald Herbert, The Associated Press Police guard the emergency room entrance of Our Lady Of The Lake Medical Center, where wounded officers were brought, in Baton Rouge, La., Sunday, July 17, 2016. Multiple law enforcement officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge, less than two weeks after a black man was shot and killed by police here, sparking nightly protests across the city. (AP Photo/Gerald Herbert)

Gerald Herbert, The Associated Press Police guard the emergency room entrance of Our Lady Of The Lake Medical Center, where wounded officers were brought, in Baton Rouge, La., Sunday, July 17, 2016. Multiple law enforcement officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge, less than two weeks after a black man was shot and killed by police here, sparking nightly protests across the city. (AP Photo/Gerald Herbert)



Gerald Herbert, The Associated Press FBI patrol the perimeter of the crime scene in an armored vehicle where Baton Rouge police were shot, in Baton Rouge, La., Sunday, July 17, 2016. Multiple police officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge, less than two weeks after a black man was shot and killed by police here, sparking nightly protests across the city. (AP Photo/Gerald Herbert)

Max Becherer, The Denver Post State Police block direct traffic off Airline Highway after Baton Rouge police were shot in Baton Rouge, La., on Sunday, July 17, 2016. Multiple law enforcement officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge, less than two weeks after a black man was shot and killed by police here, sparking nightly protests across the city. (AP Photo/Max Becherer)

Scott Clause/The Daily Advertiser via AP Baton Rouge police respond to active shooter near Hammond Aire Shopping Center in Baton Rouge, Sunday, July, 17, 2016. Multiple law enforcement officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge, less than two weeks after a black man was shot and killed by police here, sparking nightly protests across the city. (Scott Clause/The Daily Advertiser via AP)



Scott Clause, The Daily Advertiser via AP) Baton Rouge police respond to active shooter near Hammond Aire Shopping Center in Baton Rouge, Sunday, July, 17, 2016. Multiple law enforcement officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge, less than two weeks after a black man was shot and killed by police here, sparking nightly protests across the city. (Scott Clause/The Daily Advertiser via AP)

Mike Kunzelman, The Associated Press Baton Rouge police officers man a roadblock at Old Hammond Highway and Tara Boulevard after multiple officers were shot, Sunday, July 17, 2016, in Baton Rouge, La. (AP Photo/Mike Kunzelman)

Mike Kunzelman, The Associated Press Authorities talk to the driver of a car near an area where several officers were shot while on duty less than a mile from police headquarters, Sunday, July 17, 2016, in Baton Rouge, La. (AP Photo/Mike Kunzelman)



Chris Grange/NOLA.com The Times-Picayune via AP A police officer in tactical gear sets up in a parking lot while responding a police shooting near Old Hammond Highway and Drusilla Lane in Baton Rouge on Sunday, July 17, 2016. Multiple law enforcement officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge, less than two weeks after a black man was shot and killed by police here, sparking nightly protests across the city. (Chris Grange/NOLA.com The Times-Picayune via AP)

Chris Grange/NOLA.com The Times-Picayune via AP Baton Rouge Police respond to a shooting on police officers near Old Hammond Highway and Drusilla Lane in Baton Rouge on Sunday, July 17, 2016. Multiple law enforcement officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge, less than two weeks after a black man was shot and killed by police here, sparking nightly protests across the city. (Chris Grange/NOLA.com The Times-Picayune via AP)

Gerald Herbert, The Associated Press Police guard the emergency room entrance of Our Lady Of The Lake Medical Center, where wounded officers were brought, in Baton Rouge, La., Sunday, July 17, 2016. Multiple law enforcement officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge, less than two weeks after a black man was shot and killed by police here, sparking nightly protests across the city. (AP Photo/Gerald Herbert)



Max Becherer, The Associated Press Baton Rouge Police with assault rifles block Airline Highway after police were shot in Baton Rouge, La., Sunday, July 17, 2016. Authorities say multiple law enforcement officers have been killed and injured in a shooting in Baton Rouge Sunday. (AP Photo/Max Becherer)

Max Becherer, The Associated Press Baton Rouge Police arrive at the scene on Airline Highway after police were shot in Baton Rouge, La., Sunday, July 17, 2016. At least three officers are confirmed dead and at least three others wounded after the shooting, a sheriff's office spokeswoman said Sunday. One suspect is dead and law enforcement officials believe two others are still at large, the spokeswoman said. (AP Photo/Max Becherer)

Max Becherer, The Associated Press A Baton Rouge Police vehicle escorts cars out of the area on Airline Highway after police were shot in Baton Rouge, La., Sunday, July 17, 2016. At least three officers are confirmed dead and at least three others wounded after the shooting, a sheriff's office spokeswoman said Sunday. One suspect is dead and law enforcement officials believe two others are still at large, the spokeswoman said. (AP Photo/Max Becherer)



Mike Kunzelman, The Associated Press Baton Rouge police officers man a roadblock at Old Hammond Highway and Tara Boulevard after multiple officers were shot, Sunday, July 17, 2016, in Baton Rouge, La. (AP Photo/Mike Kunzelman)

Max Becherer, The Associated Press Baton Rouge police block Airline Highway after police were shot in Baton Rouge, La., Sunday, July 17, 2016. Authorities in Louisiana say several law enforcement officers are dead, and several injured in Baton Rouge after on-duty law enforcement officers were shot on Sunday morning. (AP Photo/Max Becherer)

Gerald Herbert, The Associated Press FBI patrol the perimeter of the crime scene in an armored vehicle where Baton Rouge police were shot, in Baton Rouge, La., Sunday, July 17, 2016. Multiple police officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge, less than two weeks after a black man was shot and killed by police here, sparking nightly protests across the city. (AP Photo/Gerald Herbert)



Max Becherer, The Associated Press Baton Rouge Police take a man into custody who was driving a car on Airline Highway and Goodwood Blvd. near where police were shot in Baton Rouge, La., Sunday, July 17, 2016. A shotgun was found in the car and police detained the man to investigate. Multiple law enforcement officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge, less than two weeks after a black man was shot and killed by police here, sparking nightly protests across the city. (AP Photo/Max Becherer)

Henrietta Wildsmith/The Times via The Associated Press Baton Rouge police officer Randy Bonaventure takes a bouquet of flowers at the Our Lady of the Lake Hospital where the police officers were brought this morning, Sunday, July 17, 2016. Multiple law enforcement officers were killed and wounded Sunday morning in a shooting near a gas station in Baton Rouge. (Henrietta Wildsmith/The Times via AP)

After the Marines, he attended the University of Alabama for one semester, in the spring of 2012, according to university spokesman Chris Bryant. University police had no interaction with Long during that time, Bryant said.Oren Segal, director of the Center on Extremism for the Anti-Defamation League, said there was no information linking Long, who was black, to any known extremist group or movement, but the ADL and others were investigating Long’s possible use of aliases.

Sunday’s incident was the latest in a series of deadly encounters in the United States involving police and black men that have sparked a national debate over race and policing. It also came less than two weeks after 37-year-old Alton Sterling, a black man, was fatally shot by police in Baton Rouge in a confrontation that sparked nightly protests and has reverberated nationwide. Police-community relations in Baton Rouge have been especially tense since Sterling’s death.

In Kansas City, police converged on a small turquoise frame house listed under Long’s name. An Associated Press reporter said some officers had weapons drawn from behind trees and others were behind police cars and unmarked cars in the residential neighborhood in the southern part of the city.

Missouri court records show that a Gavin Eugene Long filed a petition for divorce from his wife in February 2011. The online court records don’t say why the couple divorced, but the petition indicates they had no children and that Long had represented himself. Three months after the divorce petition was filed, his ex-wife was granted restoration of her maiden name. Last month, on June 7, a case against Long by the city of Kansas City over unpaid city earnings taxes was dismissed.

___

AP journalists Maria Sudekum, Gerald Herbert and Janet McConnaughey also contributed to this story. Suhr reported from Kansas City; Mohr from Jackson, Mississippi.