A Kenner man wanted in a shooting surrendered to police Wednesday afternoon after a lengthy standoff with a SWAT team that ended when a robot was sent in to aid negotiations.

Kenner police said Daniel Cook, 34, gave up peacefully after spending about five hours inside his family’s house in the 3200 block of Northwestern Drive. Cook held SWAT officers and U.S. marshals at bay by claiming he had an assault rifle with a 30-round clip.

Kenner police Lt. Brian McGregor said Cook was wanted in connection with a shooting last week. The victim drove himself to Kenner police headquarters on Friday to report that Cook had shot him in the face. He was taken to University Medical Center with injuries from what police said was either a small-caliber handgun or a high-powered pellet gun.

After the shooting, U.S. marshals and Kenner police began periodically checking on the house Cook shares with his 81-year-old grandmother on Northwestern Drive, McGregor said. Responding Sunday to a report that Cook had been at the residence, police arrived and found the woman with three broken ribs. McGregor said police were not sure how she was injured because she suffers from dementia.

Finally, about 9:15 a.m. Wednesday, McGregor said, authorities spotted Cook outside the house. He ran inside and barricaded himself.

Police lobbed at least seven tear gas canisters into the residence in an attempt to force Cook out. As the hours passed, TV camera crews came and went, and schoolchildren tried to slip past crime-scene tape that was blocking their way home.

McGregor said it took a Jefferson Parish Sheriff’s Office robot to finish the job. Once the device was sent inside, authorities were able to use a video connection to talk with Cook and persuade him to surrender. About 3:30 p.m., heavily armed SWAT team members started walking back toward their trucks and packing up their gear.

Police were still in the process of obtaining a search warrant to see whether Cook did indeed have an assault rifle, McGregor said Wednesday afternoon.

Authorities said Cook is well known to them and was on supervised release at the time of the standoff. He has prior convictions in Jefferson Parish for aggravated flight in 2005, resisting an officer in 2006, burglary in 2009, unauthorized use of a motor vehicle in 2010, unauthorized entry in 2011, battery of a police officer in 2011 and theft in 2014.

Police said they planned to book Cook on counts of aggravated battery, stalking, unauthorized entry and theft of a firearm, among others.