BP has sold off its petrochemicals business in a move designed to help it become a lower carbon firm.
The $5bn (£4.1bn) deal with Ineos will see BP all but pull out of a sector expected to contribute to demand for oil over the coming decades.
BP boss Bernard Looney said the sale of the business, which employs 1,700 people, "will come as a surprise".
Campaign group Greenpeace UK said the sale money "must be invested in a transition to renewable energy."
BP is in the process of mapping out a major shift in direction it announced in February, when it said it planned to sharply cut carbon emissions by 2050.
Further details of how it plans to get there are expected in mid-September.
BP has also been looking at its assets to decide which ones to sell in the light of this strategy and a decline in demand amid the coronavirus pandemic.
"Strategically, the [petrochemicals] overlap with the rest of BP is limited and it would take considerable capital for us to grow these businesses," Mr Looney said in a statement.
"As we work to build a more focused, more integrated BP, we have other opportunities that are more aligned with our future direction," he added.
The business includes stakes in manufacturing plants in the UK, the US, Trinidad and Tobago, Belgium, China, Malaysia and Indonesia.
The petrochemical plants attached to BP's oil refineries in Gelsenkirchen and Mulheim in Germany will not be sold.
The International Energy Agency said in 2018 that it expected plastics and other petrochemical products to help boost global oil demand up to 2050, off-setting slower consumption of motor fuel.
However, in June BP forecast lower oil prices for decades to come as governments speed up plans to cut carbon emissions in the wake of the coronavirus crisis.
Earlier this month, it announced plans to cut 10,000 jobs after a slump in demand for oil due to Covid-19.
BP's petrochemicals business was smaller compared with rivals such as American oil giant Exxon Mobil or Royal Dutch Shell after it sold its Innovene division in 2005 to Ineos.
The firm, majority-owned by billionaire Sir Jim Ratcliffe, has a network of more than 180 sites in 26 countries and about 22,000 employees.
That left BP's petrochemicals business focused on aromatics, which are used in polymers for plastic bottles and packaging, and acetyles, which are used in paints, solvents and pharmaceuticals.
However, growing consumer concern about marine pollution has made those sectors a less likely long-term bet for BP as it focuses on improving its green credentials.
The sale also meant BP has hit a $15bn asset sales target one year ahead of schedule.
Progress towards the target had slowed after BP had to renegotiate terms of its sale of two oil and gas portfolios in Alaska and the North Sea in recent months.
Santander analyst Jason Kenney said that the deal is positive for BP because of the limited overlap with its other operations.
It also strengthened expectations that BP will not cut dividend payments to its shareholders, he said.
Environmental campaign group Greenpeace said it was vital that BP invests in renewable energy.
Mel Evans, senior oil campaigner for Greenpeace UK, said: "BP has sold its petrochemicals business to free up some cash, but it remains to be seen how BP will spend the money.
"BP's boss Bernard Looney admits we may be at peak oil demand, and our climate can't handle more burning of oil or gas. So if BP cares about our planet's future - or even its own future - this money must be invested in a transition to renewable energy."