BOSTON – The state House of Representatives approved a major tax bill Wednesday night that Democratic leaders say will generate more than half a billion dollars for transportation infrastructure by increasing taxes or fees on gasoline, corporations, ride-booking services and vehicle purchases by rental car companies.

Lawmakers voted mostly along party lines in favor of the bill, 113-40.

Representatives rejected or withdrew dozens of amendments that would have rewritten key sections of the bill, opting instead to advance a revenue-heavy bill, with few prescriptions for how the money should be spent, similar to the version offered by House Speaker Robert DeLeo and his top deputies.

DeLeo and other elected officials had pledged since last year that they would take action to raise new revenue for transportation, hoping to revitalize the aging and unreliable MBTA system, inject more money into road maintenance, and offer greater support to regional transit authorities.

Wednesday's vote came after months of behind-the-scenes deliberations and with less than five months of formal lawmaking business remaining before the Legislature breaks to focus on elections.

Under the bill, which Democratic leaders project will bring in $522 million to $612 million per year, the state's 24-cents-per-gallon gasoline and diesel taxes would increase by 5 cents and 9 cents, respectively.

Those hikes would be the first of their kind since 2013, when Beacon Hill approved a controversial law whose sections indexing the gas tax were repealed by voters in a referendum one year later. That law increased the gas tax by 3 cents.

The House's proposal also seeks increases to the corporate minimum excise tax, which has not been changed in 30 years, from $456 for all companies to a tiered structure at the top of which companies with more than $1 billion in sales would pay at least $150,000.

Transportation network companies such as Uber and Lyft would be subject to higher costs as well. The bill would increase the 20-cent-per-trip flat fee to $1.20 for each non-shared ride and $2.20 for every luxury ride, while keeping the cost the same when users carpool. The legislation contains language aimed at preventing the companies from passing those hikes directly to riders.

An amendment proposed by Rep. Josh Cutler, D-Pembroke, would block those fees from applying to riders who use the companies for paratransit service. The amendment was adopted on a voice vote.

The fourth prong of the revenue bill would require rental car companies to pay sales tax when they buy vehicles for their fleets, a tax from which they are exempt under existing law.

Every Republican member of the House voted against the proposed tax increases, as did independent Rep. Susannah Whipps and eight Democrats, including Reps.Michelle DuBois of Brockton and Patrick Kearney of Scituate.

Gov. Charlie Baker said last week he was "disappointed" with the legislation and opposes both the gas and corporate tax increases, foreshadowing a potential veto that Democrats could override with two-thirds votes.

Based on Wednesday's results, the majority party appears to have the votes for an override if necessary.

The House shot down amendments from the GOP that would have scrapped or blunted several of the tax and fee hikes. One amendment filed by Minority Leader Brad Jones would have repealed the gas, corporate and vehicle sales tax sections of the bill if and when a surtax on household income above $1 million takes effect.