This city, Wisconsin's biggest with nearly 600,000 people, was long home mostly to people of German and Polish ancestry. Now, no single group holds the majority: 45 percent of residents are white; 38 percent are black; 12 percent are Latino, Mr. Barrett said.

A recent Census Bureau study showed Milwaukee to be among the most segregated cities in the United States, though some here strongly dispute its methodology and point to another study that suggests that segregation is far less severe.

''You can argue about whether it's first or 12th or whatever, but still, this is always a more segregated town than some,'' said Eugene Kane, a columnist for The Milwaukee Journal Sentinel who is African-American and often writes about race in the city. ''Socially, it is more segregated than most communities.''

A few months back, Mr. Pratt, who is 59 and a longtime alderman, was trailing in polls, behind another black candidate, David Clarke, a conservative and Milwaukee County's sheriff, and Mr. Barrett, 50, a former United States representative who had run for governor.

But on primary day in February, Mr. Pratt outpaced them all. Mr. Barrett came in second. In the weeks that followed, Mr. Pratt would later complain bitterly, little good was said about him.

The Journal Sentinel reported that Mr. Pratt was behind on his bills. Eight days before the election, the district attorney, E. Michael McCann, charged Mr. Pratt with five civil counts of breaking campaign finance rules. Mr. McCann said Mr. Pratt had failed to report some contributions and some expenditures. Mr. Barrett seized on the issue, running commercials that alluded to Mr. Pratt's troubles. One showed a storm cloud over City Hall.

The accusations came at an awkward moment for this city. Though Wisconsin used to pride itself for squeaky clean politicking, Milwaukee's City Hall had been drenched in scandal in recent years. Three members of the Common Council, Mr. Pratt's colleagues, went to prison after convictions on federal charges of financial wrongdoing. And Mayor Norquist's departure from office had followed a sexual harassment scandal and his admission that he had had an extramarital affair.