BOSTON -- In passing comprehensive energy legislation Wednesday night, the Massachusetts Senate approved a "revenue-neutral" carbon fee designed to incentivize low-emissions lifestyles and business practices.

An Act Combating Climate Change, sponsored by Michael Barrett, D-Lexington, would add a "pollution charge" to fossil fuel prices and return that money in equal measure to people and businesses.

The government would not keep the money. For carbon fees paid by individuals, each person in the state would receive an equal share of the total collected. For businesses and other institutions, each would get a rebate proportional to its share of total employment.

"Climate change is relentless, and 'putting a price on carbon' is the single most effective thing a government can do to fight it," Barrett said.

Even conservative economists have gotten behind the market-based concept. "No one is claiming the carbon tax is a perfect outcome," wrote William G. Gale, a senior fellow with the Brookings Institute. "But relative to the alternatives, it has an enormous amount to offer."

Proponents say the charge would give consumers and producers a strong incentive to shift from fossil fuels to clean energy, and that low- to moderate-income households would not be hurt because they would get their money back.

The bill instructs the governor's office to develop carbon pricing for the transportation sector by the end of 2020, for commercial buildings and industrial processes by 2021 and for residential buildings by the end of 2022.

"This isn't about the Legislature forcing one design, and one design only, upon a governor," said Barrett. "We're firm on timing, but we don't mandate the method."

He said if the bill survives debate in the House, that Massachusetts would become the second state, after California, to extend carbon pricing to transportation. No other state has approved a "revenue-neutral" carbon pricing mechanism.

The bill would exempt electricity production because it's already covered by other programs. It would provide additional rebates to households in areas where it's necessary to drive more than average, and to businesses that are energy-intensive but face stiff out-of-state competition.

The Massachusetts House has not yet produced an energy bill this session, but that situation could change. Barrett said an "array of organizations are gearing up to preserve the groundbreaking elements of today's legislation."

He said he's been pushing for a carbon-pricing mechanism since 2013.

Massachusetts law requires that the state reduce its greenhouse gas emissions to 25 percent below 1990 levels by 2020, with an 80 percent reduction by 2050.