The weeklong manhunt came to end when Hossein Nayeri, 37, and Jonathan Tieu, 20, were taken into custody on Saturday morning in San Francisco's park district, the police said.
A woman approached police officers and pointed out a white van that looked like one Nayeri and Tieu were reported to have stolen in Los Angeles following their escape, Orange County Sheriff Sandra Hutchens said at a news conference.
When the officers approached the van, in the parking lot of a Whole Foods market, Nayeri popped out and ran away, leading officers on a chase before they caught him a short distance away, Hutchens said. Tieu, who tried to hide in the van, was arrested soon after that, she said.
The white van appears to be the same one the two men stole and were believed to be living inside following their escape, said the sheriff, who expressed relief over the capture.
"My fear was someone in the community was going to get hurt, because they really had nothing to lose," said Hutchens, whose Orange County Sheriff's Department operates the maximum-security jail in Santa Ana where the three inmates escaped last week.
The daring Jan. 22 breakout recalled the escape of a pair of convicted murderers from an upstate New York prison last year. That pair evaded capture for three weeks before one of them was shot dead and the other was captured near the Canadian border.
Bac Duong, 43, gave himself up on Friday in Santa Ana, about 375 miles (604 km) south of San Francisco, officials said.
Nayeri, the presumed mastermind of the breakout, was incarcerated at the Orange County Men's Central Jail on charges stemming from the 2012 mutilation torture of a kidnap victim.
Tieu was facing murder charges and Duong has been charged with attempted murder and assault with a deadly weapon, among other crimes. The pair are reputed to be connected with Vietnamese-American street gangs.
The men made their getaway by cutting through steel grating inside the jail, climbing through a plumbing conduit to the roof and lowering themselves four floors to the ground with bedsheets, authorities said. Their disappearance went unnoticed for about 16 hours.
The California escape was similar to the New York breakout as both cases involved a female civilian employee of the correctional facility who provided help, authorities say.
Nooshafarin Ravaghi, who taught English at the Orange County jail, was arrested on Thursday on suspicion of assisting in the escape. She is accused of furnishing the inmates with Google Maps information that included overviews of the jail rooftop and surrounding areas.
Ravaghi, who is expected to be arraigned on Monday, had befriended Nayeri, according to authorities. She exchanged handwritten letters with him that were personal in nature, the sheriff's office said on Friday.
In the New York breakout, the fugitive inmates had help from a female prison employee who allegedly had sexual relations with one of them. She was sentenced to seven years for her role.