The first transportation bill to acknowledge climate change won unanimous support Tuesday from the Senate Committee on Environment and Public Works.

“This is the most substantial highway infrastructure legislation in history,” said panel chairman John Barrasso (R-Wyo.). “Ninety percent of that money will go directly to our roads and bridges.”

How to pay for the $287 billion, five-year reauthorization bill lands in the hands of the Senate Finance Committee, where the challenge is greater than simply coming up with a 27 percent boost in funding to shore up U.S. roads and transit systems.

“Our nation’s Highway Trust Fund is operating on the brink of bankruptcy,” said Sen. Thomas R. Carper (Del.), the top Democrat on the public works committee. “The last five-year reauthorization bill . . . was largely paid for by a series of largely irresponsible budget gimmicks.”

He said the legislation would channel $10 billion to reducing emissions and increasing the resilience of infrastructure so that it will better stand up to the impact of climate change.

“We know that the cars, trucks and vans that we drive have now become our nation’s largest source of global warming pollution,” Carper said. “These emissions accelerate and exacerbate the effect of climate change, contributing to the increasingly extreme weather events that contribute significantly to the degradation of our roadways and our bridges.”

“We have to be able to deal with the realities of more severe weather,” added Sen. Ben Cardin (D-Md.), who said that many consumers prefer electric to gas-powered cars.“This bill recognizes that transportation is the leading source of greenhouse gas emissions.”

President Trump tweeted his support for the bill Tuesday, saying the “Senate is working hard on America’s Transportation Infrastructure Act. Will have BIG IMPACT on our highways and roads all across our Nation . . . Do I hear the beautiful word, BIPARTISAN?”

Of Tuesday’s 21-to-0 vote, Carper said: “The fact that a bill this significant happens to be bipartisan should not come as a great surprise to anyone. Our roads, our highways, our bridges connect us to one another.”

Trump’s embrace of the Senate plan marked a pivot from his efforts to negotiate a $2 trillion deal that included a broader array of infrastructure projects with House Speaker Nancy Pelosi (D-Calif.) and Senate Minority Leader Charles E. Schumer (D-N.Y.).

After Trump and leading Democrats agreed to a broad framework for such a deal in April, negotiations collapsed in May as Trump angrily walked out of a meeting at the White House. He said he was unable to work with Democrats because Pelosi that morning had said he was ducking congressional subpoenas as a “coverup” for his own misbehavior.

Early last year, the Trump administration formally unveiled its own plan to stimulate spending on the country’s ailing infrastructure. But that received a cold reception from members of both parties and included no clear way to pay for the plan.

That proposal, a year in the making, sought to fulfill a marquee Trump campaign promise by relying heavily on states, localities and the private sector to cover the costs of new roads, bridges, waterways and other public-works projects.

The plan called for investing $200 billion in federal money over the coming decade to entice other levels of government and the private sector to raise their spending on infrastructure by more than $1 trillion. That would have allowed the administration to hit its goal of $1.5 trillion in new funding over 10 years. It also sought to dramatically reduce the time required to obtain environmental permits for such projects.

Barrasso promised that the transportation bill would “speed up project delivery, cut Washington red tape, so that projects can be done faster and better and cheaper and smarter.”

On the opposite side of the Capitol, House Transportation Committee Chairman Peter A. DeFazio (D-Ore.) saluted the Senate’s bipartisan effort, saying that “the need for resilient infrastructure, alternative fuel corridors, and serious efforts to reduce congestion” are a must before any bill goes to the White House.

DeFazio, who has favored an increase in the gas tax until a vehicle-miles-traveled plan unfolds, acknowledged that “there is still a big question about how we pay for these investments.”

Jim Tymon, executive director of the American Association of State Highway and Transportation Officials, said finding the money was the “big question.”

He said that a five-year bill provided the stability that states need to plan multiyear projects. And he welcomed the funding for climate change issues.

“Something needs to be done to make sure that we’re not rebuilding the same pieces of infrastructure every five, 10 years when we have a major weather event,” Tymon said. “We’re seeing it in some of our coastal communities, also along the Gulf Coast when we have a major weather event. You’re also seeing it in the interior part of the country in the flooding you saw, the river flooding in Iowa, Nebraska, Missouri.”

The bill got pushback from Sen. Joni Ernst (R-Iowa), whose state is a major producer of ethanol, the corn-based product that is added to about 98 percent of gasoline. She objected to a provision to promote electric charging stations.

“If all emission-reducing fuels aren’t going to be treated equally by this program, then my preference is to do away with the program entirely,” Ernst said. “We’re going to have the federal government subsidize charging infrastructure for electric vehicles, which are owned in large part by high-earners in coastal states. While at the same time leaving our corn and soybean farmers and biofuel producers on the sideline.”