Correction: An earlier version of this editorial incorrectly stated that a jury would decide the class-action discrimination lawsuit. There is no jury; rather, U.S. District Judge G. Murray Snow, who is presiding over the trial, will decide the case. The version below has been corrected.

SHERIFF JOE ARPAIO delights in the tough-guy persona he has cultivated in 20 years as the top law enforcement officer in Arizona’s sprawling Maricopa County, which includes the city of Phoenix. In fact, Mr. Arpaio is a bully whose swagger and TV talk-show bluster derive chiefly from his notoriety for harassing largely powerless Latinos — legal residents, illegal immigrants and even citizens, along with prisoners in the jails he runs. A darling of nativists and xenophobes, who have helped pump $7 million into his reelection campaign chest this year, Mr. Arpaio has never been called to account for his noxious policies or words — until now.

In a federal civil trial in Phoenix, Mr. Arpaio stands accused of systematically using racial profiling to mount “crime-suppression” sweeps of homes, workplaces and neighborhoods. In fact, the sweeps were intended mainly to round up undocumented immigrants — though legal Hispanic residents and citizens were also caught up.

The sweeps, which contributed to what the Justice Department calls “a wall of distrust” between the sheriff’s office and Latinos, are Exhibit A in the class-action suit brought by Latino citizens and residents accusing Mr. Arpaio of discrimination. Exhibit B — as well as C, D, E and F — consists of Mr. Arpaio’s statements and writings over the years, many of which he is now at pains to explain, defend or disown.

What did the sheriff mean when he wrote that second-and third-generation Mexican immigrants maintained values that were “separate” from those of America’s mainstream? Does he really believe illegal immigrants are “dirty,” as he said? Was he serious when he said it was “an honor” to be accused of behaving like the Ku Klux Klan? Why did he think it appropriate to initiate a raid on a neighborhood shortly after receiving a letter from a woman reporting that she had heard Spanish being spoken by the staff at a restaurant?

And what about Mr. Arpaio’s remark to Glenn Beck two years ago, when he explained how his deputies determine whom to target for arrest: “Their speech, what they look like, if they just look like they just came from another country — we can take care of that situation.”

Mr. Arpaio has denied that he engages in racial profiling. But when confronted with evidence of his bigotry, the sheriff for once sounded almost meek, or at least chastened, a tone he attributed to a bout with the flu. His attempts at self-justification — blaming his ghostwriter for his comments about Mexican Americans — were pitiable.

U.S. District Judge G. Murray Snow will decide whether Mr. Arpaio’s explanations are credible and whether the policies he has enforced, as leader of a department with almost 3,000 sheriff’s deputies and jail officers, deprived Hispanics of their civil rights and equal protection of the Constitution. If Judge Snow decides in favor of the plaintiffs, he may order changes in sheriff’s department’s policies and appoint a monitor to ensure the changes are carried out.

A similar lawsuit, brought by the Justice Department, is pending in federal court. Mr. Arpaio’s response has been to vent his wrath at the federal government, even trying to revive the canard about President Obama’s birth certificate. But the sheriff, even if he is reelected to a sixth term this fall, may spend much of the rest of his life defending himself in one way or another against charges of bias.