Mayor Bloomberg delivers final major address as mayor of New York City on Dec. 18. (Spencer Platt/Getty Images) Mayor Michael Bloomberg delivers his final major address as mayor of New York City. (Spencer Platt/Getty Images)

On Jan. 1, New York City Mayor Michael Bloomberg will leave the city he has run for 12 years in infinitely better shape than when he took office in the aftermath of the Sept. 11, 2001, terrorist attacks that felled the World Trade Center towers. When Bloomberg was sworn in on the steps of City Hall, Ground Zero still smoldered a few blocks away. Today, the Big Apple is booming like never before.

As my former editor Michael Goodwin wrote in the New York Post earlier this month, Bloomberg “ushered in a Golden Age of Gotham.” But the 108th mayor of New York also ushered in something else: the best race relations in decades.

When Bloomberg ran for mayor, there were several knowns in a campaign very few people thought would win. One was that Ray Kelly, who was police commissioner from 1992 to 1994 under the last Democratic mayor, David Dinkins, would return to the job. Another was recognition that the adversarial relationship between communities of color and the police and City Hall, respectively, that exacerbated racial tension and left race relations in tatters had to change.

It was all laid out in Bloomberg’s public safety plan released on Aug. 27, 2001. The eight-page document heralded the reduction of crime through Mayor Rudolph Giuliani’s zero-tolerance for quality-of-life crimes. But eight years of aggressive police work came at a cost. To convey the message of a change in tone from City Hall and an adjustment of a few police tactics without compromising hard-fought crime reductions, Bloomberg’s public-safety plan was titled “Don’t Go Back.”

A booming economy helped bring a new day to the Big Apple. But the return of jobs and the influx of new residents and tourists could not and would not have happened were it not for Mayor Giuliani’s zero-tolerance of quality-of-life offenses. . . .

But unfortunately, for some, particularly communities of color, the fear of crime has been replaced by a fear of the police. The aggressive strategies of Operation Condor and the Street Crimes Unit, which helped to free those communities from drugs, guns and violence, had the unintended consequence of driving a wedge between police and the people they were sworn to protect.

Anthony Baez. Abner Louima. Amadou Diallo. Patrick Dorismond. Their names have become synonymous in the public’s mind with excessive force, police brutality and racial profiling. The tragic circumstances surrounding their violent encounters with the police only fueled the perception that the NYPD was an out-of-control force occupying neighborhoods.

When viewed through this prism of anguish and alarm, that fear of the police is understandable. . . .

We can’t go back to the days of rampant crimes. We can’t go back to the days of public powerlessness and lax leadership from City Hall. We can’t go back. Ever.

The explicit message was don’t go back to the days of rampant crime. The thinly veiled implicit message was that a Mayor Bloomberg wouldn’t go back to the days of disrespect and disregard visited upon communities of color during the Giuliani years. And I know this because, as a policy adviser to Bloomberg during that first mayoral campaign, I wrote “Don’t Go Back” with Kelly and other aides.

Racial tension crackled on the streets of New York City for as long as anyone could remember. As Francis Wilkinson of Bloomberg View wrote earlier this year, “The racial tensions of the 1980s bled into the racial division of the 1990s.” Mayor Ed Koch’s handling of a series of searing racial incidents in the 1980s was “disgraceful.” Dinkins, elected in 1989 in part to soothe racial tensions, only stoked them further with his handling of the Crown Heights riots in 1991. The three days of violence in that Brooklyn neighborhood was called “the most extensive racial unrest in New York City in over 20 years” in a report to then-Gov. Mario Cuomo in 1993. And then there was Giuliani.

Giuliani’s knee-jerk and unwavering support for the police during his tenure (1994-2002) — whether it was the brutal sexual assault of a Haitian immigrant in a stationhouse (Louima) or the shooting an unarmed African immigrant in a hail of 41 police bullets (Diallo) — inflamed racial tensions. Giuliani’s lack of relationships in the African American community made things worse. The enmity between himself and the Rev. Al Sharpton, who led protests during all these notable racial conflagration in the city, was epic. Giuliani neither talked to Sharpton nor acknowledged Sharpton’s relevance as a community leader.

 That all changed the night Bloomberg was elected mayor, as Joyce Purnick chronicled in her book “Mike Bloomberg: Money, Power, Politics.”

Al Sharpton, whose antagonism toward [Democratic mayoral nominee Mark] Green had significantly helped Bloomberg, says he heard from the mayor-elect that night: “My cell phone rings and it’s Jonathan—Jonathan Capehart—and he said, ‘Hold on a minute.’ A voice comes on and says, ‘Hello, this is Michael Bloomberg. I want you to know it will be different with me as mayor. We will not agree on everything, but you will have access to City Hall.’ I was stunned. It was clearly a reversal in how City Hall was going to deal with us.”

Having a line of communication with Sharpton put Bloomberg and the civil rights leader on the same page when the mayor needed it. Giuliani’s callous response to the shooting death of Diallo led to daily protests and arrests orchestrated by the shunned Sharpton. When police shot and killed Sean Bell, an unarmed man outside a club the night before his wedding in 2006, the mayor held a press conference at City Hall to express his outrage at the incident. “I can tell you that it is to me unacceptable or inexplicable how you can have 50-odd shots fired, but that’s up to the investigation to find out what,” Bloomberg said with Sharpton at his side in City Hall.

Bloomberg 2001 campaign button. (Jonathan Capehart) Bloomberg 2001 campaign button. (Jonathan Capehart)

The Bloomberg-Sharpton dialogue isn’t the only reason why race relations in New York City are markedly better today than when he took office. Mitchell Moss, professor at NYU’s Wagner Graduate School of Public Service and an expert on New York city and state politics, told me via e-mail last week that the lack of union or Democratic Party institutional support for Bloomberg’s candidacy in 2001 was a key reason. “As a result, Bloomberg has been able to directly forge ties to church leaders, ethnic groups, and local community organizations that are based on their mutual interests – not the distribution of patronage jobs or contracts,” said Moss, who served as an adviser during Bloomberg’s first campaign. “Race relations are less polarized in NYC because there is not a black-white cleavage or brown-white cleavage when there are so many distinct ethnic and racial groups, none of whom are a majority or even close to a majority of the NYC population.”

Jim Sleeper, a political science lecturer at Yale University who was a Daily News columnist when I was on the editorial board at the paper, thinks factors independent of Bloomberg helped improve race relations. But, he said, “I credit him for not being inflammatory on race as Koch and Giuliani sometimes were.” As a result, the nasty racial tensions that ruled the streets of the Big Apple and separated New Yorkers from each other and their mayor have diminished greatly.

For that, Bloomberg deserves the city’s gratitude. Unfortunately, his reaction to last August’s ruling against the NYPD’s stop-and-frisk program threatens to overshadow that historic accomplishment.

Follow Jonathan Capehart on Twitter: @Capehartj

Jonathan Capehart is a member of the Post editorial board and writes about politics and social issues for the PostPartisan blog.