Jon David Guerrero was taken into custody Friday. He's been charged with three counts of first-degree murder, two counts of attempted murder, and two counts of arson.
"We can all rest a little easier tonight knowing that this predator is off our streets," San Diego Police Chief Shelley Zimmerman said at a news conference Saturday.
"These evil acts of violence committed by Guerrero were some of the worst that I've seen in my 34 years in law enforcement. This killer has targeted some of our community's most vulnerable citizens while they were sleeping."
Police say two homeless men died after being set on fire. Another died after an assault. Two other men have also been attacked and are in critical condition.
The first three incidents occurred in a 25-hour period between July 3-4. The fourth attack happened July 6, when authorities found a man ablaze on the ground across from the federal courthouse downtown. That victim later died.
The most recent attack happened early Friday, when police heard a victim's cries for help and alerted other law enforcement officials in the area. As they began searching for the suspect, one of the officers came across Guerrero.
"Detectives discovered physical evidence at the scene and at the suspect's residence that definitively and uniquely identified and links together the recent murders and brutal attacks against our homeless community," said San Diego Police Capt. David Nisleit.
Authorities said it was too early to talk about motive.
Police officials said they were confident Guerrero was acting alone.
Man once considered suspect released
Earlier this week police released a 36-year-old man
who was taken into custody but never formally charged after police found "exculpatory evidence" that showed he could be innocent. Police said he looked strikingly similar to a man seen on a surveillance video who was buying gasoline at a Shell gas station store shortly before one attack.
San Diego's mayor mourned the loss of innocent victims whose lives were "cut short by a disturbed murderer."
"Recently we've had a citywide conversation about homelessness, and we must continue to keep that conversation going," Kevin Faulconer said at the news conference.
"We must continue to create and support police and add housing to help people get off the streets."
This isn't the first time San Diego County has seen violence targeting the homeless and transient populations. Earlier this year, two brothers and a female teenager were accused of fatally beating a homeless man in El Cajon after one of the brothers allegedly got into a fight with some other homeless people in the area.