The gunman suspected in Wednesday’s fatal shooting in Atlanta had an appointment at the Midtown medical office where five people were shot, police said.

“He spent about maybe two minutes inside the building, where he then exited on foot,” Atlanta police Deputy Chief Charles Hampton Jr. said during a Wednesday evening news conference.

Shortly before 8 p.m., Deion Patterson was taken into custody at an apartment complex just north of Truist Park in Cobb County.

He is accused of opening fire at a Northside Hospital medical building in Midtown, where one woman was killed and four others were injured around noon, police said. Hampton said Patterson had an appointment at the medical office, but a motive has not been determined.

A 39-year-old woman was pronounced dead at the scene. Four other women, ages 71, 56, 39 and 25, were rushed to Grady Memorial Hospital. At least three of them were seriously injured.

Patterson then went to a Shell gas station, where he stole a white pickup truck that was left running and unattended, Hampton added. A series of search warrants were obtained in Atlanta and Cobb for locations where authorities believed Patterson could have gone, Hampton said.

At around 12:30 p.m., Flock cameras located the vehicle in Cobb, but it took two hours for police to be notified. The vehicle was located near The Battery and towed away from a parking lot along Heritage Court.

“These are massively complex investigations, and information comes in so quickly and it is so confusing and so contradicting that we find that we are often trying to go to three or four different places very quickly — each seeming to be the suspect,” Cobb police Chief Stuart VanHoozer said.

VanHoozer added that his officers were called to various locations across Cobb by citizens saying they had spotted the suspect.