A Southern California city will pay $700,000 to a man who was arrested in the 2011 killings of his mother and brother but freed when his high school friend confessed to the crimes.

Eder Herrera's lawyer John Burton said Tuesday that the city of Brea has agreed to pay the 27-year-old, putting an end to his lawsuit against police.

Herrera says he was wrongly jailed for three months after his mother and brother were stabbed to death in their Yorba Linda home.

He was released in 2012 after authorities said they connected suspected serial killer Itzcoatl Ocampo to the killings.

Ocampo died in jail in 2013 after eating a cleaning product.

A lawyer for Brea says the deal helps limit the city's liability.