It wasn’t long ago that the future looked bleak for Birmingham.

The pandemic had blown a $63 million hole in the Alabama city’s finances, and the costs were piling up: furloughed workers, slashed salaries, cuts to programs as varied as the arts and the zoo. On the day last fall that the city council passed its red-ink-streaked budget, angry librarians protested outside.

But the atmosphere abruptly changed this month when the city’s Democratic congresswoman came to town bearing an outsized $148 million check. The symbolic bank note, bearing President Biden’s signature, reflects the city’s allotment of federal coronavirus relief funds. It also represents, said Mayor Randall Woodfin (D), an opportunity to fix Birmingham’s biggest problems.

“It’s a fundamental game-changer for our city,” Woodfin said.

Across America, cities that were cash-strapped and beleaguered only months ago now find themselves flush with money and ready to spend. Although city leaders say their first job will be to heal the damage, many believe they will be able to go beyond that and address some of the root inequities that the coronavirus pandemic laid bare.

In Birmingham — a city of just over 200,000 — Woodfin said investing in minority-owned businesses, constructing affordable housing and strengthening child mental health care will be high on his priority list.

In Seattle, local leaders plan to vastly expand a program, modeled on the Depression-era Civilian Conservation Corps, that pays homeless people to clean up parks and roadways.

And in St. Louis, the newly elected mayor is examining whether $500 million in aid ­— equivalent to nearly half the city’s annual budget — is enough to pay residents a basic income.

“Ever since I’ve been in office, we’ve been robbing Peter to pay Paul,” said Tishaura Jones (D), who was St. Louis’s treasurer for eight years before being elected mayor this month. “This is the first time we won’t have to do that. We’ll be able to make some investments.”

Researchers who study American cities say leaders are right to think big and creatively, once they’ve filled the gaps created by the pandemic. The influx of money as part of Biden’s $1.9 trillion American Rescue Plan is unlike any that cities have seen in decades, with relatively few restrictions attached to its use.

“This is generationally significant,” said Mark Muro, policy director at the Brookings Metropolitan Policy Program. “It’s a time to strengthen cities and seek their reinvention, where possible.”

Muro said that the impact of the coronavirus and widespread business shutdowns had varied widely from city to city, with those dependent on sales tax revenue or tourism dollars hit hardest.

But even in those places that emerged relatively unscathed overall, the pandemic exposed deep disparities in access to basics such as health care, housing and transportation, all of which can potentially be combated with the federal funds.

“This convergence of crises is creating enormous opportunity for change and progress,” said Dow Constantine, the top elected official in King County, Wash., which includes Seattle. “We don’t want to miss this window.”

State and local aid accounted for $350 billion of the total coronavirus relief package, which was signed by Biden last month after passing Congress on party-line votes. Of that, $130 billion went to local governments, with allocations determined by a combination of population and need.

In a bill that also included direct payments to citizens and funding for vaccination campaigns, among other items, state and local aid aroused particularly intense Republican objections.

GOP members of Congress slammed the spending as “a blue-state bailout,” and they charged that cities would be fiscally profligate and use the money to fund “a liberal wish list.” Earlier rounds of coronavirus relief, passed under President Donald Trump, had left all or most cities out.

Democrats “want to send wheelbarrows of cash to state and local bureaucrats to bail out mismanagement from before the pandemic,” Senate Minority Leader Mitch McConnell (R-Ky) charged during the debate.

Alabama Attorney General Steve Marshall (R) raised the prospect that the vast sums flowing into state, city and county coffers would invite corruption.

“The amount of money that we are receiving in such a short period of time is unprecedented and, in my line of work, raises concerns,” said Marshall, who encouraged officials to brush up on the state’s ethics laws.

But GOP mayors have not shared their fellow Republicans’ opposition, with many enthusiastically backing the relief for cities as a necessity — and brushing aside concerns that the money will go to waste. They note that unlike Congress, cities must keep their budgets balanced.

“There’s a misconception that most cities are free spenders,” said Arlington, Tex., Mayor Jeff Williams, a Republican. “Cities are watched so closely. Our citizens are right here, and we’re dealing with them each and every day.”

Williams said that his city of 400,000 was more fortunate than most: Pre-pandemic, the economy had been booming. But Arlington has taken a serious hit, with tourism falling, small businesses failing and the city bracing for impact as commercial property values decline.

“We have been hit with a natural disaster. Just like an earthquake or tornado or flooding. The difference is that this lasts longer,” Williams said. “It basically gutted our economy. Now we need to get it going again.”

The federal aid, he said, will be central to that effort, with assistance going to small businesses and the city restarting infrastructure projects that had to be put on hold when the pandemic hit. Among them is a rebuilding of city water lines, the necessity of which became clear when a cold front tore through Texas and burst pipes across the state this winter.

Water, sewer and other infrastructure projects are among the items that cities have been told they can spend the money on, although officials are still awaiting detailed guidance from the Treasury Department. That could come in the next several weeks, alongside the first tranche of aid; the second, and final one, will come next spring.

Cities have up to four years to spend the money, and many have just begun to craft a strategy.

Indianapolis was large enough to receive funding last year, when a previous round of assistance was limited to major metropolitan areas. That money went toward urgent needs spawned by the pandemic. Among them: distributing 800,000 cloth masks, said Chief Deputy Mayor Taylor Schaffer.

This time around, she said, the city can take a longer view. Among the many items that could be funded are trail and other greenway projects, even those that are still several years away. “Some of them are shovel-ready. Some of them are almost shovel-ready. And there are projects that are not shovel-ready but are in the design phase,” she said.

Cities are right to take their time to figure out how to spend such large sums, said Robert Simpson, chief executive of the CenterState Corporation for Economic Opportunity, the chamber of commerce in Syracuse, N.Y.

“An opportunity like this doesn’t come around all that often,” he said. “Communities would be remiss not to think strategically.”

That thinking, he said, should include not only physical infrastructure such as extending broadband networks, but also investments in skills training and education to address long-standing disparities in economic opportunity. In Syracuse, unemployment spiked as high as 16 percent last year, and many workers have to adapt to a changed jobs market.

“If we’re not investing in 21st-century infrastructure, then we put ourselves at risk in the next pandemic,” Simpson said.

Some jurisdictions have proposed plans to do just that. Constantine, King County’s executive, has assembled a $600 million coronavirus recovery plan that uses federal, state and local funds in an attempt to — as the Biden administration has put it — “build back better.” 

While much of the money is geared toward bolstering public health and fighting the coronavirus directly, other spending is more peripherally related. In addition to expanding its jobs program for the homeless, the county will invest money in businesses rooted in Black and Indigenous communities, and fund community groups focused on combating hatred and prejudice.

“We’re trying to find a way to close these race-based gaps in our community coming out of this crisis,” he said.

That was a dominant theme of Jones’s campaign as she sought to become the first Black female mayor in St. Louis’s history. Jones, a liberal, said she didn’t know whether the city would have the means to accomplish many of her goals until Congress passed the relief package. Now it does — provided St. Louis spends the money well.

“It’s definitely a lifeline,” Jones said. “But we also have to recognize that one of the reasons why we got so much money is that we have such abject poverty. My focus is: How do we use these funds to address that?”

The city has set up an online portal for residents to weigh in on their priorities for the funds. Jones said the idea of a basic income for some residents was in the mix, along with rental assistance, upgrades to broadband networks and a consolidation of the city’s 911 system.

Woodfin, Birmingham’s mayor, said that once the city has restored the cuts it made last year to its workforce, he would focus on issues such as homelessness, which have been exacerbated by the pandemic.

In his central Birmingham neighborhood, he said, “you get to know your neighbors, including those who are homeless. There were a lot of new faces last year that I’d never seen before.”

Normally, he said, dealing with the problem by providing rental assistance or building affordable housing is cost-prohibitive. But, perhaps, no more.

“Now,” he said, “we have the opportunity to actually do something about it.”