LONDON — The British government is once again trying to revive its flagging effort to extract the country’s natural gas and oil from shale rock.

On Wednesday, members of Parliament voted 298 to 261 to approve legislation allowing use of the shale-gas-extraction technique known as hydraulic fracturing 1,200 meters, or nearly 4,000 feet, beneath the surface of national parks and other protected areas, including World Heritage sites.

The push by Prime Minister David Cameron’s Conservative Party comes just days after delegates to the United Nations climate conference in Paris reached a widely hailed agreement on curbing carbon dioxide emissions blamed for global warming. Despite the ambitious goals outlined on Saturday, many analysts say they believe oil and gas will play crucial roles in the world economy for decades.

The opposition Labour Party criticized the government for weakening the protection of areas that need it. “We should have a moratorium on fracking in Britain until we can be sure it is safe and won’t present intolerable risks to our environment,” said Lisa Nandy, a Labour energy spokeswoman.