The shooting at Southern Union Community College in Opelika killed a 63-year-old woman, wounded two more women, ages 36 and 94, and injured a 4-year-old who was hit with flying glass.
About three hours later, when city officers already had left campus, a man driving a white Jeep Liberty with the same tag number police had released as the suspect's pulled into the parking lot where the shootings occurred.
Photographer Todd J. Van Emst, who was taking photos of the scene for The Associated Press, said the man asked to use his cell phone.
Van Emst said the man gestured and said he "did all this."
"I said, 'Are you the shooter?"' said Van Emst. "He said, 'Yes.'"
Media members called 911 and police arrived within a few minutes and knocked the man to the ground, handcuffing him, Van Emst said.
Thomas Franklin May, 34, was charged with capital murder and attempted murder and being held without bond, said Police Chief Tommy Mangham. One of the wounded women was May's estranged wife, Mangham said, but authorities wouldn't release additional information on the victims, including their conditions.
Court records show Bethany L. May filed a request seeking protection from abuse against Thomas May last Friday, but online records don't provide details. A judge in Lee County issued a temporary order on Monday and scheduled a hearing for May 11. Records don't indicate whether Thomas May had received copies of the documents.
May's wife was inside a Toyota minivan that was in the parking when the shooting erupted. Photos showed three windows shot out and blood splatters stained the asphalt hours after the killing.
Student Quay Thomas said he heard nine shots.
"It was terrifying," said the 17-year-old.
City spokeswoman Jan Gunter said officers were still trying to sort out details but believed the afternoon shooting was related to a dispute between a man and a woman.
The school closed the campus for the day after the shootings. Southern Union has about 5,000 students and is located almost 60 miles east of Montgomery.
Associated Press writer Jay Reeves in Birmingham contributed to this report.