BP says it will slash its own greenhouse gas emissions to net zero by 2050 and gradually shift its investments into energy projects that do not emit carbon dioxide.

The world’s fifth-largest oil-and-gas company said Wednesday it would cut the carbon content of its products by 50 percent by 2050 by selling energy that does not come from fossil fuels or by offsetting oil-and-gas production with tools that capture carbon dioxide. It also said it would install methane measurement equipment at all of its processing sites by 2023 to reduce leaks.

Carbon dioxide and methane are two gases that have contributed to a warming climate, scientists say.

The plan would change the focus of the 110-year-old company. And the amount of carbon dioxide emissions BP intends to eliminate would roughly equal the emissions of Britain.

“Make no mistake: We aim to invest more and more in low-carbon businesses over time and by consequence less and less in oil and gas,” BP’s new chief executive, Bernard Looney, said in a webcast from London.

However, Looney did not lay out a timetable, and for now BP will continue drilling, which drew sharp criticism from climate activists.

The company’s pledge to achieve net zero carbon emissions assumes that it would still produce oil and gas in 2050, with those emissions offset by technologies that might suck carbon dioxide from the air. The net zero calculation does not include BP’s one-fifth share of Rosneft, one of the biggest Russian oil companies.

The BP plan does not focus on emissions generated by its customers, such as when people drive cars that burn BP gasoline. For oil companies, that accounts for 85 percent of emissions.

But Looney said that BP would achieve a similar result by making its own oil-and-gas production net zero and by aiming to make the oil BP buys for its refineries meet net zero targets. (BP refines more oil than it produces.) In addition, as BP reduces the amount of oil and gas it extracts from the ground and as motorists move to electric vehicles, emissions from gasoline and diesel would fall steeply.

Looney noted that BP’s exploration budget has already dropped by two-thirds since 2013.

“BP’s announcement is important because it promises to bring the emissions from the use of all the oil and gas it produces to net zero, not just reduce the carbon intensity of what it sells. That can’t be achieved just with some trees and offsets,” said Jason Bordoff, founder and head of Columbia University’s global energy center.

“It means BP is fundamentally promising to become a completely different kind of energy company by 2050,” he said. “Now we need its actions to live up to its promises.”

Pavel Molchanov, senior energy analyst at the investment firm Raymond James, called the announcement “game-changing in terms of scale. BP has become the first supermajor — and, as such, the largest oil-and-gas company — to set a net zero target for carbon emissions.”

Looney’s announcement comes nearly 10 years after the Deepwater Horizon oil spill in the Gulf of Mexico, which forced the company to divest itself of about $70 billion of its oil-and-gas assets.

“We have got to change and change profoundly,” Looney said Wednesday. “I get it. The world does have a carbon budget, and it is running out fast.”

Looney said that the trillions of dollars required for “rewiring and replumbing” the world’s energy infrastructure over the next three decades provide plenty of projects in which BP could invest.

“Some see that as a threat, a threat to our existence,” Looney said. “I see it differently. I see opportunity.” The company has already tapped its prodigious cash flow from oil-and-gas operations to make substantial investments in renewable-energy areas, including Lightsource BP, a leading developer of utility-scale solar projects.

But Looney acknowledged that BP “is going to be in the oil-and-gas business for a very long time” because of the commitments it has to governments and shareholders, including about $8 billion a year in dividends.

BP shareholders have already shown backing for climate action. At the annual meeting in May, shareholders approved a climate resolution that called for the company to meet the goals of the 2015 Paris climate accord. The resolution, co-filed by shareholder group Climate Action 100+ and backed by the company, won the support of 99.14 percent of the votes. Climate Action 100+ is a group of relatively modest investors.

A second resolution, which urged BP to reduce the emissions from the use of its products, was opposed by the company and defeated.

Even as the Trump administration and U.S. lawmakers struggle over forging a climate plan, BP joins other companies vowing to make deep cuts in energy use.

Last week, Dominion Energy announced a goal to achieve net zero greenhouse gas emissions by 2050, joining at least 17 other U.S. utilities that are setting net zero targets. Dominion’s goal applies to both its electric and natural gas businesses in the 18 states where it operates.

Looney also said that BP would seek to alter the positions of some trade associations to which it belongs. If that fails, he said the company would withdraw from those groups. This has been a major source of dispute with environmental groups, which have cited BP’s heavy spending campaign in Washington state in 2018 to defeat a modest carbon tax there, as well as its membership in the American Petroleum Institute.

“We will have new relationships with trade associations,” Looney said. “We will make the case for our views on climate change. . . . And where we can’t reach alignment, we will leave.”