The city of Phoenix has agreed to pay an undisclosed amount of money to settle a lawsuit over the 2011 death of a mentally ill man who was arrested by its police officers and later died in a jail run by then-Sheriff Joe Arpaio, ending a case in which the jail's operator had already paid millions of dollars to the man's family.

The latest settlement was reached in late April, just weeks before the city faced trial in the lawsuit over Ernest Atencio's death. Maricopa County, which operates the county's jails, avoided a trial by agreeing two months ago to pay $7 million to Atencio's survivors.

Arpaio, who ran the county's jails as sheriff and is now a candidate for U.S. Senate, was known for enacting tough jail policies during his 24 years as sheriff of metro Phoenix. The well-known political figure was convicted of criminal contempt of court in a separate racial profiling lawsuit but later pardoned by President Donald Trump, his political ally.

Critics say he created a culture of cruelty within the jails that took the lives of inmates and proved costly. Maricopa County has paid $40 million in jail-related legal claims that were filed during Arpaio's tenure.

Michael Manning, a lawyer for Atencio's family, said the terms of the settlement prevent him from publicly revealing the amount of money that Phoenix will pay. But the amount was expected to be revealed when the City Council votes on the settlement in the future.

"It has been a seven-year nightmare (for Atencio's family)," Manning said. "They can now continue in relative peace."

Kathleen Wieneke, who represents the city, didn't immediately respond to a phone call and email seeking comment Monday.

Atencio, 44, was arrested in December 2011 by Phoenix police on a misdemeanor assault charge after they say he frightened a woman by yelling at her and kicking at her apartment door. The officers who arrested him had an encounter with Atencio earlier that day at a convenience store, where they concluded his erratic behavior was the result of mental illness, not intoxication.

The lawsuit accuses an officer of attacking Atencio at the jail after he refused to take off one of his shoes. It alleges that Arpaio's officers joined in and formed a "dog pile" on top of the inmate. A sheriff's officer fired a stun gun at Atencio, and another later struck him as other officers held him down, according to the lawsuit.

Earlier, while being booked at a jail in downtown Phoenix, Atencio was seen talking to a container of peanut butter as if it were a person, even offering to give up his jacket to it, police said. His lawyers have said he wasn't acting aggressively toward the officers.

At the time he died, the sheriff's office had said Atencio was combative when police brought him to jail.

The lawsuit alleges that the officers taunted Atencio for not being able to follow directions and encouraged him to make funny faces while his mug shot was taken. One officer is accused of saying authorities should make it the "Mug Shot of the Week," referring to a contest in which people can vote on their favorite booking photo.

___

Follow Jacques Billeaud at twitter.com/jacquesbilleaud. His work can be found at https://bit.ly/2GGWEPO.