It’s surprising that it took this long, but Chicago’s long-standing tradition of public corruption has finally emerged in John McCain’s campaign against Barack Obama.

McCain on Monday unveiled a 30-second TV spot that attempts to link Obama with various players in the city’s enduring history of political sleaziness. The ad begins with a narrator, in a grave voice, announcing that Obama "was born of the corrupt Chicago political machine." It quickly flashes to a clip of Obama defending his personal toughness by saying that he comes from Chicago.

The ad then weaves in headshots of several top Chicago politicians linked to local pay-to-play politics. The former Obama fundraiser Antoin "Tony" Rezko, convicted of federal corruption charges unrelated to Obama, is there. So is Bill Daley, the mayor’s brother, a Democratic power broker and an adviser to Obama; Governor Rod Blagojevich, whose administration has served as a treasure-trove for U.S. attorney Patrick Fitzgerald’s investigators; and Illinois senate president Emil Jones Jr., who, according to the ad, has been Obama’s "political godfather" and is under an "ethical cloud."

I’m not sure how effective the commercial will be in a national race, but like many political attack ads, it takes a nugget of reality and exaggerates it for full negative effect. Its theme is guilt by association—if Obama was born and raised among a den of thieves, by golly, he is a thief, too.

The problem is, Obama was not "born" in Chicago, although his political career was birthed here. Obama is a native of Hawaii, where he was raised outside of politics by a woman who was an honest and caring soul, almost to a fault. When he arrived in Chicago as an adult, Obama bobbed and weaved his way through the city’s corrupt system without being too overly tainted by this culture. He never immersed himself in the corrupt machine, although, despite his early reputation as a reformer and all his good-government instincts, it’s also true that he never made a serious attempt to dismantle the apparatus, either.

Obama’s worst ethical sin remains his close relationship with Rezko, whose campaign fundraising at the commencement of Obama’s run for the U.S. Senate allowed Obama to open a campaign office and hire a couple of staff members. Without that help from Rezko, Obama might not have been able to pose as a serious Senate candidate for a few months before fully becoming a serious candidate, which means he might never have risen to be the presidential contender he is today. Then, of course, there was the infamous Hyde Park house deal with Rezko’s wife, which Obama has conceded was "boneheaded."

What’s also true, however, is that through most of Obama’s political career in Chicago he operated on the fringes of the political machine and never fully immersed himself in the belly of its operations. Obama’s message of inclusion, his attention to the plight of the less fortunate, and his personal sense of morality—these aspects of Obama’s character made him a favorite among reformers such as the former federal judge Abner Mikva and Cook County commissioner Forrest Claypool.

Even though he was a state legislator from the city, Obama made sure to maintain a safe distance from Mayor Richard M. Daley and his cronies. When Obama’s wife, Michelle, told her husband that she was considering working in city hall, Obama waved yellow caution flags because he worried that Michelle was too straightforward and straight-talking for the backroom dealing of the Daley administration.

I don’t mean to dismiss Obama as fully clean in Chicago’s dirty pool of pols. His wooing of Jones as his major political benefactor in the state senate shows that Obama was willing to consort with—and use—powerful Chicago chieftains for his own political advancement. And when Obama became a presidential candidate and needed the financial and political support of the Chicago Machine, he prominently stepped forward and endorsed Mayor Daley and Cook County board president Todd Stroger. The Stroger endorsement even came at the expense of Claypool, Obama’s reform-minded friend, who remains a close adviser.

In my first extended interview with Obama in December 2003, I asked him to define his relationship with the mayor. Obama winced and paused before finally responding, "Cordial, not close." Since then, Obama has grown far chummier with Daley, but nothing more accurately sums up the ties between Obama and the vaunted Chicago Machine than his own words way back then: "Cordial, not close."