California Gov. Jerry Brown speaks about the state’s cap-and-trade program at the California Chamber of Commerce in Sacramento on Thursday. (Rich Pedroncelli/Associated Press)

“IT’S GOING to so polarize the country and so galvanize the opposition that actually the climate action effort and coalition will get much stronger,” California Gov. Jerry Brown (D) told NPR on Friday, the day after President Trump announced the United States’ withdrawal from the Paris climate agreement. Mr. Brown and his counterparts in New York and Washington state got started quickly, trumpeting the creation of the United States Climate Alliance, a yet-to-be-elaborated-upon effort from three states that account for about 20 percent of the nation’s population and gross domestic product.

The federal government is irreplaceable in fighting climate change. But until a more rational president enters the Oval Office, state and local efforts can prevent the United States from totally abandoning what may be greatest global challenge of the 21st century: heading off the worst effects of man-made global warming.

California and a coalition of Northeastern states already have the right mechanisms in place. A decade ago, California passed its landmark climate law, putting a cap on the state’s greenhouse-gas emissions and requiring industry to obtain permits to pollute under that cap. About the same time, a group of states stretching from Maine to Maryland agreed to create a similar program across their region. These schemes created markets in which carbon permits could be bought and sold, establishing a market-based price on carbon dioxide emissions. Economists from one end of the ideological spectrum to the other have long counseled that pricing emissions is the best way to reduce greenhouse gases, because it musters the efficiency-driving power of markets toward cutting pollution.

The most valuable thing state leaders can do is expand on this model. They should seek to partner with more states, widening the carbon markets they have created. This would drive down costs, as companies would have a larger range of emissions-cutting opportunities in which to invest. It would also bring more and more of the national economy under a carbon cap. Virginia Gov. Terry McAuliffe (D) announced last month that his state would seek to join with others in such an arrangement. Many more states should follow. States should also make their goals more ambitious, setting their carbon caps to decline steadily over time, sending a signal to industry that investments in cleaner infrastructure will pay off.

Though carbon pricing is far and away the most important response, there are other steps that states and cities should consider. Encouraging denser urban development would cut car use and improve air quality. Investing in public transit would help, too. Updating building codes and appliance standards to require efficiency improvements could drastically cut energy waste. Curbing natural gas leaks would save valuable fuel and reduce emissions. Raising state gasoline taxes would discourage unnecessary driving and provide revenue to build roads and rails. These sorts of initiatives are plausibly bipartisan.

State and local action will not fill the large gap the federal government leaves as it abdicates responsibility on climate change. States such as California and New York already have relatively low per capita carbon emissions. Texas has a population significantly smaller than California’s but emits vastly more carbon pollution into the air. Federal action will be needed to get many red states to meet minimum standards. Until then, states with wiser leaders should make it their goal to show that moving off fossil fuels can be done at a reasonable cost.