Martin O'Malley was standing on a chair, shouting in a dark bar in Iowa City. He may have been nearly a thousand miles from Baltimore, but for him, that wasn't far enough.

It was a stormy summer evening, and about 150 people had come to hear O'Malley make the case that he should be president—a case that had gotten frustratingly tricky. Not that long ago, O'Malley, the former governor of Maryland and a perpetually rising star in Democratic politics, seemed like the no-brainer alternative to Hillary Clinton. “The best manager working in government today,” the Washington Monthly called him, a problem solver who had slashed crime as mayor of Baltimore. But now those rosy urban achievements had taken on the stink of controversy, complicating his pitch for the presidency.

A young woman in a peasant skirt raised her hand. “As mayor of Baltimore, you oversaw an era of mass arrests of nonviolent offenders,” she told the candidate, citing statistics—“110,000 arrests were made in one year in a city of 620,000 people”—before getting to her question. “What are we supposed to expect from you on the issue of mass incarceration and institutional racism?”

As he listened, O'Malley's smile grew forced and his jaw began to bulge. He has a temper. Plus, he doesn't like to be called out. As mayor, O'Malley once paid a visit to a couple of radio hosts criticizing him for being insufficiently concerned about crime. “Come outside after the show,” he scolded them, “and I'll kick your ass.”

Now, in Iowa City, O'Malley seemed on the verge of unloading again. He'd been on edge since April, when riots erupted in Baltimore after cops were implicated in the killing of an unarmed black man named Freddie Gray. Years of mistrust between the city's police and its black citizens were glaringly exposed—and suddenly the two terms O'Malley spent as the city's mayor from 1999 to 2007 were subject to brutal re-examination. O'Malley—who had always taken plenty of credit for slowing crime by employing tough “zero tolerance” policing techniques—found himself being blamed for the city's racial acrimony.

David Simon, the former Baltimore Sun reporter and creator of The Wire, declaimed that “the stake through the heart of police procedure in Baltimore was Martin O'Malley.” On Meet the Press, Chuck Todd incredulously asked O'Malley, “Do you think you can still run on your record as mayor of Baltimore, governor of Maryland, given all this?” And when O'Malley launched his presidential campaign, protesters crashed the festivities, chanting “Black Lives Matter” and burnishing NOMALLEY signs. In the wake of police violence in Ferguson, Cleveland, New York, and now Baltimore, the old-school good-governance dictates about getting tough on crime seemed out of touch. Suddenly Democrats were scrambling to take up the mantle of police reform, and O'Malley was stranded on the wrong side of one of the defining issues for liberals today.

“You weren't in Baltimore in 1999, but I was,” he told the young woman, with more than a hint of contempt in his voice. “It looked more like Mexico City than an American city, and the gutters quite literally ran with blood.” There was no applause. These people didn't get it, he seemed to be thinking. What he'd done in Baltimore was worthy of their respect and not, as the woman in the peasant skirt suggested, part of “the long history of brutalization” of “communities of color.” He was the guy, he wanted to tell them, who could save those communities—the guy who knows that you don't stop criminals by asking politely and that turning around a city isn't as easy as replacing open-air drug markets with shabby-chic condos. But that kind of talk had fallen out of fashion. The political hand O'Malley had been planning to play was now a loser. The man who wanted to be president swallowed hard and tried to pivot to something else.