PHOENIX (Reuters) - Former Arizona lawman Joe Arpaio, who gained national prominence for his tough stance against illegal immigration, was found guilty on Monday of criminal contempt for violating the terms of a 2011 court order in a racial profiling case.

FILE PHOTO: Joe Arpaio addresses the media about a simulated school shooting in Fountain Hills, Arizona, U.S. February 9, 2013. REUTERS/Darryl Webb/File Photo

Arpaio, 85, who lost his bid for re-election as Maricopa County sheriff last November after 24 years in office, faces a maximum penalty of six months in jail and a fine when he is sentenced on the misdemeanor offense on Oct. 5.

U.S. District Judge Susan Bolton ruled on Monday that Arpaio “willfully violated” the order.

“I am very disappointed with her decision, but the case will be appealed,” Arpaio told Reuters. His attorneys said in a written statement the 2011 order was not clear.

“Her verdict is contrary to what every single witness testified in the case,” the former sheriff’s legal team said in the statement. “Arpaio believes that a jury would have found in his favor, and that it will.”

Federal prosecutors could not be reached for comment.

Bolton delivered her verdict more than four weeks after the conclusion of a five-day non-jury trial in which Arpaio stood accused of deliberately violating the injunction, issued by another federal judge.

She wrote that the evidence at trial proved “beyond a reasonable doubt” that the previous judge issued a clear order barring Arpaio from detaining people for further investigation without reasonable suspicion.

Bolton found Arpaio guilty of contempt for intentionally defying the 2011 court order, which barred his officers from stopping and detaining Latino motorists solely on suspicion that they were in the country illegally.

Arpaio styled himself as “America’s toughest sheriff” for his no-nonsense treatment of jail inmates and crackdown on undocumented immigrants.

The judge in the underlying lawsuit, brought by the American Civil Liberties Union and others in 2007, held that such traffic stops were a violation of the motorists’ constitutional rights.

“Joe Arpaio learned his lesson the hard way — no one, not even America’s so-called toughest sheriff, is above the law,” the ACLU said following the verdict.

Federal prosecutors said racial profiling of Latino drivers continued for about 18 months after the injunction was issued, with 170 more people wrongfully detained.

Lawyers for Arpaio argued at trial that he was merely doing his job and that the judge’s order was unclear.

Arpaio admitted to having inadvertently disobeyed the 2011 injunction but said his behavior did not meet a criminal standard. He said the contempt prosecution was a politically motivated attempt by then-President Barack Obama’s administration to undermine his re-election bid.

The former sheriff attended all the court proceedings but never took the witness stand in his own defense.