Mayor Bill de Blasio pulled off an impossible feat Thursday by uniting Americans of all persuasions — against his quixotic presidential bid.

True to form, de Blasio was late to join the Democratic primary field, and became the 24th person to announce his candidacy.

The campaign kickoff immediately prompted howls of scorn and derision — from the far right to the far left — and strikingly brought NYPD cops and Black Lives Matter activists shoulder to shoulder in a unified front outside the Times Square studio of ABC’s “Good Morning America.”

Members of the Police Benevolent Association and the anti-cop protest group joined in chants of “Liar!” and “Can’t run the city! Can’t run the country!” outside the ground-floor studio where de Blasio and wife Chirlane McCray were unveiling his 2020 bid.

Also there were members of East Brooklyn Congregations, a group that says de Blasio reneged on a promise to build $500 million of low-income senior housing.

The protest was so loud it forced host George Stephanopoulos to mention it to the mayor and first lady on air.

Public Advocate Jumaane Williams, a fellow Democrat who by city law would take over if the mayor was gone from the Big Apple for more than nine straight days, also took to the airwaves. He said de Blasio was in no position to run for president after scoring a “net negative” as mayor since 2014.

He told Fox 5’s “Good Day New York” that “if [de Blasio’s] going to push out, ‘I’m going to do for the nation what I did for New York City,’ as of right now, to me that’s a tough sell because I don’t want to see that happen.”

Shortly before his TV appearance, de Blasio posted a three-minute YouTube video in which he’s shown being driven around a New York City that no real Gothamite would recognize.

The video shows the mayor zipping along without getting stuck in traffic or passing by any homeless or piles of trash — and improbably features a city worker sweeping a sidewalk.

But de Blasio’s social media strategy, which included blocking comments from YouTube users, fell flat, generating fewer than 42,000 views and just 67 subscribers.

The video also spurred complaints that de Blasio improperly recorded some segments inside Gracie Mansion, a tactic others have eschewed for 50 years since Mayor John Lindsay filmed a 1969 reelection commercial on the porch.

“The city prohibits using government stationery for private means,” said John Kaehny, executive director of government watchdog group Reinvent Albany.

“So, if the city is that concerned about appearance, then it should be pretty clear the mayor should be extremely careful about using the interior of government buildings only he has access to for campaign purposes.”

The mayor’s office insisted the city’s Conflicts of Interest Board had cleared the Gracie Mansion usage.

Josh Ginsberg, of Zignal Labs, a San Francisco-based media analytics firm, said de Blasio’s campaign had generated about 125,000 mentions on TV and the internet since Wednesday night, when news spread about his expected announcement.

“About 72% of the conversation is negative,” said Ginsberg, whose company works for three other Democratic candidates.

Meanwhile, President Trump wasted no time before tweeting that de Blasio was “considered the worst mayor in the U.S.”

“He is a JOKE, but if you like high taxes & crime, he’s your man. NYC HATES HIM!” Trump added.

Trump later repeated those remarks in a video recorded on Air Force One, adding: “I wish him luck, but really it’d be better off if you get back to New York City and did your job for the little time you have left.”

And the Republican National Committee released a “Bill de Blasio cheat sheet” that lists scandals ranging from “pay-to-play allegations to murdering a groundhog.”

The latter outrage referenced a Post expose about the death of a rodent named Charlotte that Blasio infamously dropped during a 2014 Groundhog Day ceremony at the Staten Island Zoo.

Councilman Ritchie Torres (D-The Bronx) said “there’s a real concern that the city will atrophy” while de Blasio pursues his dream of the presidency.

Torres said that the city Housing Authority was “in a state of human crisis” without a permanent chairperson for more than a year, while “homelessness is spiraling out of control.”

“The notion that New York City is so strong that it can afford to have an absentee mayor is delusional,” he said.

Another council member, who spoke on condition of anonymity, also wondered whether “when we’re ready to pull the trigger on a bunch of last-minute budget stuff, is it going to be ‘Well, we have to call the mayor and find out where he is.’ ”

“Is he going to be at a campaign event in Des Moines, or is he going to be here?” the lawmaker added.

Veteran lobbyist and longtime pal Sid Davidoff struggled when asked if he wanted to see de Blasio in the White House.

“In a Democratic primary, would I vote for him as my candidate? Um, you know there are several people in this race that I think I wouldn’t have a problem voting for, and

I wouldn’t have a problem voting for him,” he said.

During an afternoon interview on liberal radio station WBAI-FM, McCray even seemed unsure son Dante — who appeared in a widely lauded, 2013 de Blasio mayoral campaign commercial — would be stumping for his dad.

“You know, I just don’t know. I no longer speak for our young people,” she said of Dante and daughter Chiara. “They’re young adults now starting their lives and, of course, they are supportive. I really can’t say.”

In April, a Quinnipiac University poll showed a stunning 76% of New Yorkers said they didn’t want de Blasio to run for president.

But during an afternoon news conference in Battery Park City, de Blasio touted his anemic, 1% popularity in a poll released Wednesday by Reuters, which he said

marked his first milestone to qualify for debates in June and July.

A Democratic National Committee source said the lineup wouldn’t be set “until two weeks before the first debate.”

Additional reporting by Elizabeth Rosner, Bob Fredericks and Lia Eustachewich