PHOENIX — Arizona's most populous county plans to ask the U.S. Supreme Court to review a ruling that concluded it is liable in lawsuits over former Sheriff Joe Arpaio's crackdowns on immigrants during traffic stops.

A judge said Arpaio, known for housing jail inmates in tents in triple-digit heat and now running for U.S. Senate, racially profiled Latinos and ordered him to halt the traffic stops, but they continued for 17 months. The former longtime sheriff was eventually convicted of contempt of court and pardoned by President Donald Trump.

Arpaio's actions led to expensive lawsuits against Maricopa County, which includes Phoenix. The top county prosecutor said its appeal isn't aimed at recouping the millions of dollars that taxpayers have shelled out in legal and compliance costs in two lawsuits that challenged the traffic stops.

Instead, County Attorney Bill Montgomery said the goal is to correct court decisions that misapplied laws saying which agencies are proper targets in lawsuits and to reduce some of the county's legal costs.

The planned appeal, approved last week in a unanimous vote by county officials, will be made in a now-settled 2012 lawsuit from President Barack Obama's Justice Department. A similar ruling on taxpayer liability from Arpaio's traffic stops was made in the lawsuit in which Arpaio was found to have racially profiled Latinos.

The Justice Department's lawsuit has cost the county $6 million, while the taxpayer costs of the other case are projected to reach $120 million next summer.

Montgomery said the 9th U.S. Circuit Court of Appeals made an error in 2015 when it dismissed Arpaio's office from the racial profiling lawsuit and substituted Maricopa County in its place.

While the county is obligated to pay costs in lawsuits against its officials, it would have to pay for additional lawyers if the county and an elected official each makes a different argument, Montgomery said.

He said the appeals court keeps ignoring state law that delegates the powers of elected county officials.

"The 9th Circuit is engaging in appellate malpractice," Montgomery said. "They aren't trying to get it."

A week ago, the appeals court issued a ruling in the racial profiling lawsuit noting that it has on several occasions rejected the argument that the county wasn't the proper target of the lawsuit.

The county has until mid-October to ask the Supreme Court to review the case.