Since January, when Gov. Martin O’Malley proposed increasing Maryland’s gas tax, prices at pumps statewide have shot up more than 40 cents per gallon. Nationally, rising gas prices have dragged down President Obama’s approval rating. And some longtime proponents of a gas-tax increase in Maryland have distanced themselves from O’Malley’s plan, saying it should be shelved until gas prices fall.

To listen to O’Malley (D) on Wednesday, however, none of that should matter to lawmakers considering his plan to phase in roughly 20 cents more per gallon in state taxes to fund road and transit work.

“Look, none of us wants to pay more at the pump,” O’Malley told lawmakers in a set of hearings that appeared to mark his last, best chance to build support for a moribund measure to apply Maryland’s 6 percent sales tax to gasoline.

“No one has wanted to address this problem for 20 years, and every year, therefore, our people are paying an increasing cost for this inaction,” O’Malley said in addressing the worsening atmos­pherics surrounding his plan.

Echoing goals laid out in his State of the State address in January, O’Malley cast his gas-tax plan as a near panacea for the state’s transportation woes.

He said the increased tax revenue would generate at least 7,500 annual construction jobs and reduce congestion on nearly every major state artery.

In all, O’Malley referenced more than $10 billion in road and transit projects, including the proposed Metro Purple Line connecting Montgomery and Prince George’s counties, although the revenue added from the tax increase would raise only a fraction of the money needed for such large-scale endeavors.

O’Malley also employed dire predictions, saying that the state’s 20-year-old flat tax on gasoline of 23.5 cents per gallon was incapable of clearing a backlog of road and bridge repairs needed to keep travelers safe.

“None of us wants to look back some day as bridges start collapsing and closing in our own state and tell our kids that we could have done something but we chose instead to simply kick the can down the road,” O’Malley said. “Yes, we’re all against taxes, but we pay for that, too.”

If O’Malley’s rare back-to-back testimony before the House and Senate began to turn the tide for his proposal, it wasn’t immediately obvious.

Lawmakers, especially in the Senate, didn’t ask many questions. They limited testimony from the governor’s transportation secretary to 60 seconds, and even Republicans held their fire. They seemed more focused on the floor debate over O’Malley’s budget plan, which included tax increases on the rich but has since been amended by Senate Democrats to include an across-the-board ­income-tax increase.

The Senate on Wednesday night advanced the budget containing that income tax increase. It also approved a last-minute ­addition that Republican lawmakers derided as a new “half-millionaire’s tax,” which eliminates the first portion of income that is taxed at a lower rate in Maryland.

O’Malley’s gas-tax increase has since January remained the most unpopular of at least a half-dozen tax and fee hikes he proposed for the budget year beginning in July.

Gas station owners responded with a grass-roots petition drive, and on Wednesday a protest organized by Maryland tea party groups brought 50 people to the steps of the State House as O’Malley testified.

Amplifying a criticism raised by some lawmakers in the House hearing, Nick Loffer, an organizer for Americans for Prosperity Maryland, said the governor was asking residents to pay a tax that he would not even notice while driving around in a state-funded vehicle.

O’Malley “has been getting chauffeured around at the taxpayers’ expense,” Loffer said.

Inside the hearing, county executives from Montgomery and Prince George’s testified along with several mayors in favor of the proposal, citing infrastructure needs in their jurisdictions and the potential to provide jobs to residents.

Baltimore Mayor Stephanie Rawlings-Blake warned that as many as 15 bridges in the city could soon be closed for safety. Montgomery County Executive Isiah Leggett said transportation projects could create “in the next 12 years, 100,000 additional jobs” in his county.

The governor’s plan, however, looks less appealing, some lawmakers noted, with each notch higher in gas prices. Pitched in January as an 18-cent increase over three years, the proposal now would top 20 cents over three years, under the current average price in Maryland.

Moments before O’Malley entered the Senate hearing, Nathaniel J. McFadden (D-Baltimore), told a group of business leaders advocating for the plan that he wasn’t convinced. “This is going to be one tough sell,” he said.

Staff writer Greg Masters contributed to this report.