Mayor Rahm Emanuel has emphatically denied that politics is behind his decision to file a pre-emptive lawsuit seeking to block U.S. Attorney General Jeff Sessions from cutting off federal crimefighting funds to sanctuary cities.

If that’s true, why did Emanuel play the media like a fiddle by dribbling out details of the lawsuit over a three-day period?

And why do the mayor’s own private emails expose his attempts to use his pro-immigration stance to shore up a national media image that took a beating after the November 2015 release of video showing a white Chicago Police officer firing 16 shots at black teenager Laquan McDonald?

ANALYSIS

In late May, nearly three months before the latest legal gambit, Emanuel sent a flurry of emails to movers-and-shakers in the national media. The subject was the “One Chicago” campaign the mayor had devised to showcase the city’s diversity.

“I wanted to put this on your radar,” the mayor wrote to George Stephanopoulos, host of ABC’s “Good Morning America” and “This Week with George Stephanopoulos.”

RELATED: Even after huge fines, some still sought help from Rahm via his personal email

The mayor went on to tell Stephanopoulos, with whom he worked in the Clinton White House, that he has “heard the constant voice of immigrant and minority communities” and their “strong sense of anxiety and alarm about the rhetoric and policies coming from the Trump administration” since the “day after” the fall election.

George Stephanopoulos | ABC photo

“Today, I launched a new public facing campaign . . . to shine the light on our values of tolerance and respect for dignity. The goal is to counter the negative rhetoric against immigrants and remind residents that we are united as one people. . . . Hoping to talk with you about the campaign in more detail if you are interested.”

Attached was a press release about the “One Chicago” campaign. Similar pitches were sent to national opinion makers including: Wall Street Journal columnist Peggy Noonan; Atlantic editor-in-chief Jeffrey Goldberg; the New York Times’ Carl Hulse and David Brooks, and Mark Halperin of Bloomberg and MSNBC.

The lawsuit that seeks to preserve $3.2 million in federal crimefighting funds not yet denied to Chicago — or even applied for — is more of the same for Emanuel.

It gives the mayor a soapbox on which to stand to proclaim himself as a national champion on an immigration issue that has haunted him throughout his political career.

As a brash young political operative under former President Bill Clinton, Emanuel once sounded a bit like Sessions in advising his boss to get tough on illegal immigrants.

Wall Street Journal columnist Peggy Noonan | File photo

In a 1996 memo to Clinton — disclosed in 2014 by the Chicago Sun-Times — Emanuel called for “record deportations of criminal aliens” and told the president that “halfway through your term you want to claim a number of industries free of illegal immigrants.”

During Emanuel’s days as Barack Obama’s chief of staff, U.S. Rep. Luis Gutierrez accused Emanuel of standing in the way of immigration reform and being singularly responsible for Obama’s failure to deliver on his campaign promise to Hispanics. Gutierrez retaliated by endorsing mayoral candidate Gery Chico over Emanuel in the 2011 election.

It was only after Emanuel became mayor and started changing his tune on immigration that Gutierrez was willing to forgive the mayor and endorse his re-election bid. Emanuel survived Chicago’s first-ever mayoral run-off against relatively-unknown Hispanic challenger Jesus “Chuy” Garcia by spending $24 million and getting 57.3 percent of the black vote and 39 percent among Hispanics.

If he decides to seek a third-term, he will likely need an even larger chunk of Chicago’s growing Hispanic vote to counter what is expected to be a precipitous drop in African-American support triggered by his handling of the McDonald case.

By positioning himself as a champion of immigrant rights against an unpopular Republican president in this Democratic city, Emanuel is staking his claim to that larger share.

The lawsuit against DOJ also serves as a welcome diversion from Chicago’s more pressing problems.

Instead of being asked about the rising homicide rate, the cash-strapped Chicago Public Schools or the hundreds of employees that the city’s school district has laid off, Emanuel can talk about standing toe-to-toe with Trump and Sessions.

“Any time you stand up for what’s right and your values, it’s not nasty. It’s about being firm and right,” the mayor said Tuesday when asked about Sessions’ sharp response to Emanuel’s lawsuit. “We will always welcome people from around the world who believe in the American dream. And we will also stand on community policing.”

Emanuel’s immigration diversion is not unlike former Mayor Richard M. Daley’s ill-fated bid to host the 2016 Summer Olympics. Instead of talking about the Hired Truck, city hiring and minority contracting scandals engulfing his administration, Daley spent years talking about the bread and circuses of the Olympics — never mind that Chicago ultimately lost the Olympics to Rio de Janeiro.