People who want to ban hydraulic fracturing for natural gas in Maryland rally outside the statehouse and governor's residence in Annapolis on March 2. (Brian Witte/ASSOCIATED PRESS)

LARRY HOGAN’S political flexibility continues to impress — if not always inspire. Maryland’s Republican governor has now positioned himself to the left of his liberal predecessor, Martin O’Malley, on whether to allow fracking in the western reaches of the state.

On his way out of office, Mr. O’Malley announced he would allow fracking in Maryland, albeit under strict limits. The state did not seem destined to match fracking behemoths such as Pennsylvania in unconventional drilling, in part because it lacks the volume of easily recoverable natural gas and in part because state leaders, from Mr. O’Malley to fracking critics in the General Assembly, appeared determined to curb fracking through tough rules or an outright ban. But Mr. Hogan insisted before entering the governor’s mansion that fracking opportunities in western Maryland were “an economic gold mine” and promised “to review every single one” of Mr. O’Malley’s regulations, presumably to loosen them and encourage drilling. Even as the state legislature considered fracking bans, Mr. Hogan pushed back.

But the governor suddenly changed his tune last month, when he announced that he now favors a fracking ban. “The possible environmental risks of fracking simply outweigh any potential benefits,” he explained. His reversal all but guaranteed that a fracking ban would advance in the General Assembly; the Senate, where the ban’s prospects were previously unclear, passed a ban bill on Monday.

For Maryland environmental activists, Mr. Hogan’s move was an unexpected victory. For Western Maryland, where the practical effects probably will not be huge, it was a mild defeat. For rationality in public policymaking, it was a shabby retreat.

Mr. Hogan has now pulled Maryland into a small group of states that has surrendered to anti-fracking activists who deny the reality that fracking can be performed safely, as long as strong regulations are in place. As study after study has shown, in most of the country fracking’s predominant environmental concerns, such as wastewater management, methane emissions and well integrity, are risks that can be managed with careful oversight.

Fracking’s benefits, meanwhile, are more than just economic. With President Trump ripping up the nation’s climate-change policy, utilities switching from dirty coal to somewhat cleaner natural gas could become a key, market-driven restraint on U.S. greenhouse emissions. Though fuel-switching alone will not get the country as far as it needs to go, fracking has unlocked massive quantities of natural gas, making it a cheap and reliable — and cleaner-than-coal — alternative fuel. Eventually, the nation will have to stop burning natural gas because it, too, releases significant amounts of heat-trapping chemicals into the atmosphere. But, as the Obama administration recognized, it can serve as a bridge fuel for now.