Former New York City mayor Michael Bloomberg speaks in March. (Ludovic Marin/AFP/Getty Images)

Wall Street billionaire Michael Bloomberg, a former Republican mayor who once spent $10 million to reelect Pennsylvania’s sitting Republican senator, was an unlikely choice to keynote the local Democratic Party’s fall dinner here last Sunday.

But when he arrived at the Sheraton ballroom, a crowd of about 500 activists welcomed the potential 2020 presidential candidate like a favorite son, mobbing him for photographs during the cocktail reception and applauding him over the salad course long before he took the stage.

“Let’s give our great Mayor Bloomberg a standing ovation early in the program,” said Sen. Robert P. Casey Jr. (D-Pa.), who was followed on stage by former governor Edward G. Rendell (D), who also praised Bloomberg’s public service.

In the audience, Rep. Dwight Evans (D-Pa.), a member of the Congressional Black Caucus, all but endorsed Bloomberg’s unannounced Democratic campaign. “I am happy he is running for president,” Evans said. “He would be the strongest one against the occupant of the White House.”

It was a trick no other politician in America would try to pull off. Half a decade after leaving elected office, Bloomberg, 76, remains a political aberration — an extremely wealthy activist mogul who refuses definition even as both political parties adopt ever-brighter shades of blue and red. And that makes his political ambitions nearly as difficult to predict as President Trump’s decision in 2015 to pursue the Republican nod.

“I can’t think of anyone more misaligned with where the Democratic Party is right now,” said Rep. Ro Khanna (D-Calif.), who recently joined Bloomberg on a tour of technology start-ups in South Carolina. “The party is not going to nominate someone who spoke at George W. Bush’s convention.”

Indeed, the list of obstacles to Bloomberg’s presidential ambitions includes bullet points that could potentially turn off just about every piece of the traditional Democratic coalition.

He defends stop-and-frisk policing that civil rights groups denounce as racist, has a history of sexual harassment cases at his company that could prove a liability in the #MeToo era and has long been a critic of public labor unions when they refuse to renegotiate their pension plans or weaken the workplace protections for teachers in public schools. After making his money selling technology to Wall Street banks, he has also been critical of the Dodd-Frank regulation enacted by Democrats under President Barack Obama.

But if he moves forward, a Bloomberg campaign would not run within the Democratic Party as it exists, exactly. His campaign would effectively be an effort to reshape it, and there is clear recent precedent for electoral success by a billionaire who starts a campaign distant from his party’s precepts.

“No one ever thought Trump could win, either,” Bloomberg said in a 25-minute interview with The Washington Post earlier in the day, as he flew across Pennsylvania on his private plane. “Nobody thought I could win.”

It is places such as Montgomery County — wealthy, highly educated and historically moderate — that would decide his success. The premise of his political career is that there is a silent majority, not of partisans fuming at the edges but disaffected moderates who would jump at a chance to upset the political system and install a competent technocrat.

“I have never been a partisan guy. I am a centralist,” he said when he took the stage at the county dinner. (An adviser later clarified that he meant to say “centrist,” a word that does not imply centralized government control.) Bloomberg compared Republicans in Congress unfavorably to the cowardly lion in “The Wizard of Oz,” and explained why he has invested $100 million to help elect Democrats to the House and Senate.

“I never would have been elected three times in a row without trying to win over voters in the middle, and ultimately I believe that makes for better government,” he said. “That was my experience in New York City and I think we need more of it in Washington, D.C.”

Running to the middle is traditionally a less popular primary strategy. But in a field that could include two dozen Democratic candidates for president, no one can say what will happen once the presidential campaign kicks off next month after the midterm elections. With a $50 billion net worth and a high appetite for risk, Bloomberg’s presidential campaign could upset the nation’s political balance or simply serve as another costly billionaire vanity project.

“There would be no limit,” said a person close to his thinking, when asked how much money Bloomberg would be willing to spend on a presidential campaign.

His first step toward the White House can be found on the road this fall, in states such as South Carolina, Nevada, New Hampshire and Pennsylvania, where he has been touring the country preaching the power of reaching across party lines while criticizing Trump as a con man who is hurting the country and the world.

The reaction has been just as particular as the charm offensive. Joe Foster, the chair of the Montgomery County Democratic Party, who welcomed Bloomberg and accepted his $25,000 donation to the dinner, admitted that the night’s billing had provoked a backlash from a “small collection” of party members who “who felt that this was not the direction that the party needed to go.”

“It’s great he’s here,” Pennsylvania Attorney General Josh Shapiro (D) said during the cocktail reception. But when a reporter asked whether he thought Democrats in Pennsylvania would embrace Bloomberg, Shapiro declined to answer with a smile. “It’s great that he is here making the rounds,” he repeated.

While his more conservative positions continue to draw Democratic criticism, Bloomberg prefers to talk these days about the liberal causes he has championed for decades. He sends tens of millions of dollars to Planned Parenthood to protect abortion access, has spent more than $100 million on the Sierra Club’s effort to close down coal-fired power plants, and has built his own network of gun regulation groups to take on the National Rifle Association.

He also is comforted by the fact that he has upended expectations before. Bloomberg remembers well the conversations he had with his pollster, Doug Schoen, before he jumped in the 2001 New York mayor’s race. “I said, ‘Can I win?’ And he said, ‘No, no chance,’ ” Bloomberg recounted. “So I said, ‘Well how bad would it be?’ ”

Schoen predicted, Bloomberg said, that he would get a third of the vote, which was enough to get him excited about the race. In the end, Bloomberg spent $74 million, and after the 9/11 attacks he beat a divided Democratic Party with 50.3 percent of the vote. (He registered as a Democrat this year, returning to the party he quit before running for mayor.)

“Mayors are executives. And I think in the White House you need an executive,” he said as the plane crossed over the undulating green hills that divide Pittsburgh and Philadelphia. “You can’t have a policy on everything. And you can’t even answer what I would do in situations down the road because you don’t know what they are going to be.”

Bloomberg sees himself less as a crusader than a left-brained engineer turned leader. He likes numbers, and his philanthropy has been focused largely on efforts that can save the most lives per dollar spent, such as keeping people from smoking, mandating helmets for motorcycle riders in the developing world or discouraging the consumption of full-sugar soda drinks.

Neither Trump nor Obama, he argues, had enough business background to properly run a federal government with 4 million employees. “Donald Trump’s not a business guy,” Bloomberg said, as the plane began its descent. “He is a real estate promoter. He has never had a big organization. I don’t know how many people he has in his company. Let’s say 100.”

The two men were never close in New York, appearing together only occasionally at ribbon cuttings and other media events. (“He didn’t know which end of the metro card to put in,” Bloomberg remembered of a time they rode the subway together.) But they did talk shortly after Trump’s victory in 2016, when their staffs connected them during the transition. Bloomberg said he offered his advice about building a strong team of managers, which he says Trump obviously failed to take.

“He gave me his personal cellphone number, which I have never tried to use,” Bloomberg said. “I am not even sure I wrote it down.”

Bloomberg’s late entry in the midterm elections has provided a much-needed boost in about 20 House districts, most of them suburban areas that would be the base of the Trump coalition. The ads focus on central Democratic messages such as gun regulation, protecting preexisting conditions and fighting climate change.

He has also given $20 million to the Democratic effort to retake control of the Senate, a task made more difficult by his 2016 support of Sen. Patrick J. Toomey (R-Pa.), who earned Bloomberg’s help by crossing lines to back a new effort to expand background checks for gun purchases.

“Toomey was one issue. I said you vote for me on this, I will support you. He did. I did. Other than that, I don’t agree with Toomey on anything,” Bloomberg said.

In this election, his focus is on curbing the power of Trump. “I’m petrified,” he said, about the possibility that Republicans will hold the House.

“The federal government can do some real damage here,” he continued. “People die. People’s livelihood can change. Climate change is real. The gun issue is real. The opioid crisis is real. Our education system getting dumbed down, where people don’t learn anything about history and civics and then you question how they vote the way they do.”

He says he will probably wait a couple of months after the election results to make a final decision on a presidential campaign, even though he is clearly doing work in the meantime to plan. The decision probably will hinge not just on the results in November, but on the reception he feels now that he has registered as a Democrat.

Neither is likely to provide a conclusive signal, however. Before the dinner Sunday, Bloomberg traveled to nearby Delaware County, another suburb of Philadelphia that has been trending blue in recent years, for a party fundraiser. County Councilman Brian Zidek (D), who swept into office last year thanks to a Trump backlash motivating Democratic voters, welcomed Bloomberg’s ambition, even as he offered caution about its potential.

“People want fire and brimstone,” Zidek said. “I think the country would be better off with technocrats. But we will see if he breaks through the noise.”