New York thought it was done with Bill de Blasio. He thinks they might want more.

“We need to look ahead; we need to build something new; we need to build something better,” he said to a receptive audience, recounting a previous conversation with a pastor concerned about New York’s post-pandemic future. “The better question is, when will we reach our greater glory? And let’s do that together.”

By the end of the week — with politicos taking bets on when state Attorney General Tish James would announce her bid for governor — de Blasio had quietly mailed paperwork to launch a committee of his own for the state’s highest elected office. The moves by de Blasio and James set up a potential primary showdown between two of New York’s most prominent Democrats, both of whom would be looking to take advantage of a power vacuum left by Andrew Cuomo’s August resignation.

De Blasio and James, who declared her candidacy on Friday, would fight for many of the same voters in New York City in a battle to unseat incumbent Gov. Kathy Hochul.

The mayor has not officially announced a bid. Asked about his plans on Tuesday, he told MSNBC, “I want to continue in public service and there’s a lot that needs to be fixed in Albany.”

Last week, he finalized forms to establish a candidate committee — “New Yorkers for a Fair Future” — with the state Board of Elections, as first reported by POLITICO.

His longtime friend and adviser Peter Ragone is overseeing the operation, reasoning de Blasio has a loyal base of Black and Latino voters throughout the city who will be persuaded by his record of launching universal pre-kindergarten and shepherding New York through Covid-19. The mayor appointed Queens resident Daniel Point as the committee’s treasurer, according to documents obtained by POLITICO.

The committee does not specify de Blasio’s exact plans. But it allows him to fundraise for a run for governor — something he has indicated he is considering, both in public statements and calls to potential supporters and donors, as first reported by POLITICO.

In recent months, he has reached out to labor affiliates, lobbyists and Orthodox Jewish community leaders — including people who have business interests before his administration — to assess support and ask for money. Several people familiar with the calls said he has requested donations of up to $25,000 from prospective donors.

The mayor has long raised money from people looking for access to his administration — a benefit that will not be available to him after his term ends Dec. 31. He now faces a mountain of debt from prior campaigns and legal bills, while two complaints issued against his presidential bid remain unresolved.

Over the past year, he has been raising money through his 3-year-old state PAC to retire some of his debt. Donors include luxury developer Aby Rosen of RFR Holdings, Texas-based lobbyist Ben Barnes — who represents a real estate project on Staten Island that requires city approvals — and Peter Ward, former president of the influential hotel workers union.

Money troubles aside, the mayor remains popular with his base of Black and Latino Democrats across the city, if last Sunday’s church visit is any indication.

Bishop Orlando Findlayter introduced de Blasio as “one of the greatest mayors in the city of New York, in the history of New York,” and subsequently told POLITICO he thinks de Blasio is consistently “underestimated, both in his accomplishments and in his ability.”

The friendship encapsulates de Blasio’s approach to politics: He was willing to take heat just weeks after he took office for trying to help Findlayter when the bishop was arrested for driving on a suspended license. The mayor seemed to believe the alliance outweighed criticism from people he readily derides as “elites” and “pundits.”

That loyalty has sustained him as support from white Democrats has steadily slipped and he failed to register in a recent gubernatorial poll.

Still, de Blasio’s path to Albany promises to be steep.

He faces stiff competition in his quest for Black and Latino Democrats from James, who would be the first Black female governor elected in the country. James also hails from Brooklyn and has remained popular there, securing 56 percent of the vote in her three-way primary in 2018. She made a name for herself taking on former President Donald Trump, the National Rifle Association and Cuomo, whose resignation followed her investigation into his alleged sexual misconduct.

New York City Public Advocate Jumaane Williams, another Black Democrat from Brooklyn, is also contemplating a run for governor after a strong showing in his own statewide race for lieutenant governor.

“Anyone looking at Tish’s numbers in her attorney general race in Brooklyn and how she swept, even with limited resources, should be pretty nervous right now,” said Democratic consultant Camille Rivera, who worked in de Blasio’s administration and is currently unaffiliated with any of the campaigns.

Asked if de Blasio could outshine James in Brooklyn, given his own ties there, Rivera suggested James’ appeal was overwhelming: “She is a queen in Brooklyn.”

De Blasio has also been utilizing his taxpayer-funded position to interact with New Yorkers in areas where he remains popular after a challenging tenure. On a recent Saturday, he issued an unusually busy public schedule that included stops in Brooklyn with his son Dante, who has factored into most of his father’s political campaigns.

Earlier this month, the mayor also hosted a City Hall bill signing that doubled as a political rally, even as he continues to refuse in-person press conferences. The celebration with the Hotel Trades Council underscored his alliance with a union that took a gamble on endorsing his longshot presidential bid.

Weeks later, de Blasio personally intervened when his own City Planning Commission was threatening to reject a controversial proposal the union had been pushing for 13 years.

And the mayor — more a creature of local politics than his sweeping rhetoric would signal — is relying on his relationship with politically engaged Orthodox Jewish figures in Brooklyn. In recent weeks, he has phoned Sephardic leaders and a prominent Satmar rabbi to share his aspirations, according to several people familiar with the discussions.

The Satmar community has long been an ally, raising small amounts of money to help him qualify for presidential debates while hinting in Yiddish fliers that the support might compel him to resolve a long-standing dispute over a synagogue.

De Blasio’s fundraising practices have landed him and his staff in the crosshairs of multiple investigations that drew scorn but no charges from prosecutors who said he improperly intervened with city agencies on behalf of his donors.

So it was surprising to some when he uncharacteristically cracked down on Orthodox communities that continued to hold in-person gatherings at the height of the pandemic.

In recent weeks, though, with the governor’s race looming, de Blasio changed his tune. He refused a request from city officials working on pandemic response to personally reach out to Orthodox leaders to combat the persistently low vaccination rates in their communities, several people with direct knowledge of the matter said. They spoke on the condition of anonymity to be able to freely discuss a sensitive issue.

“We asked him to meet with the Orthodox community and he said no,” one of the people said.

Another person familiar with the conversations disputed that characterization, saying the mayor felt he had already addressed the rabbis and believed intervention from other administration officials would be more productive.

De Blasio has also gone on an eleventh-hour spending spree — announcing in the past week alone $425 million for park upgrades, $167 million for universal broadband and $111 million to repair public housing building facades.

His spokesperson Danielle Filson scoffed at the notion the feel-good projects have a political motive.

“Since 2017 we’ve hosted City Hall in your Borough — a time-honored tradition to highlight key investments for neighborhoods that need it most. This week was Manhattan and here’s your scoop — the mayor will continue to have briefings and announce initiatives that make a real difference for New Yorkers,” Filson said.

Meanwhile de Blasio and his City Hall team are casting about for a campaign team, calling former administration employees to gauge support for working on the bid, according to several people who have received entreaties. At least one government staffer, Jillian Davidson, is assisting the operation, several people with knowledge of the matter confirmed.

Most former administration officials who spoke to POLITICO said they do not want to work on the mayor’s bid and questioned his chance of winning the crowded primary next June.

“Literally no one needs or wants this and it’s an incredible act of hubris to insert himself just as the clock is counting down on his mayoralty — in the same way that throwing himself into the presidential was absurd and did nothing for New York City,” Democratic consultant Alexis Grenell said. “He’s the mayor for at least another two months. Wouldn’t it be nice if he did his job for a little while here, instead of going on this gubernatorial joy ride?”

Political adviser Neal Kwatra offered a more generous take.

“Regardless of his critics, the reality is Bill de Blasio is by any measure one of the more successful operatives and politicians in New York politics over the last 20 years,” Kwatra said. “He has been elected citywide three times, ran a successful statewide campaign for Hillary [Clinton], has a signature policy issue in pre-K and his Covid record of late has been a model of forward thinking that has received national plaudits.”

Nevertheless, he said de Blasio will face “two incredibly impressive women” in James and Hochul, who “between them occupy much of the same political space he does.”

Neither Grenell nor Kwatra are currently working for any of the gubernatorial hopefuls.

As he maps his future, de Blasio has made plain his rationale for running in public remarks.

During a Brooklyn political breakfast Friday, he focused on his pre-kindergarten achievement and the city’s climbing vaccination rates.

He then urged attendees to vote for Democrat Eric Adams, the Brooklyn borough president, to succeed him as mayor on Tuesday. The two are old friends, and Adams has been making frequent trips to Gracie Mansion for advice about running the city.

“We need to keep Brooklyn in control of City Hall; let’s just be clear about that,” de Blasio said. “By the way, shouldn’t Brooklyn be in charge maybe farther north as well?”

Joe Anuta and Amanda Eisenberg contributed to this report.