[Editor's note: This story was updated at 8:10 a.m. CST Jan. 6.]

BP Plc's (NYSE: BP) profits more than doubled in 2017 to $6.2 billion powered by higher prices and output of oil and gas, allowing the company to resume share buybacks as it recovers from a three-year downturn.

The London-based company saw one of the strongest output increases in its history last year, lifting production to levels not seen since the 2010 Deepwater Horizon spill.

Production is set to continue growing into the end of the decade thanks to more field start-ups this year.

BP would generate profits in 2018 at an oil price of $50 a barrel (bbl), CFO Brian Gilvary told Reuters, as years of spending cuts kicked in and as it slowly shakes off a $65 billion bill for penalties and clean-up costs of the 2010 spill.

BP was the first among its European peers to resume share buybacks in the fourth quarter of 2017 after years dilutive austerity measures in the face of the industry slump.

With a 20% bounce in oil prices in the last quarter of 2017 to $61/bbl, BP had a surplus of cash that allowed it to buy $343 million worth of shares in the fourth quarter, offsetting the scrip dilution.

BP shares were trading 0.7% lower at 7:40 a.m. CST (13:40 GMT), compared with a 2.6% decline for the sector.

"2017 was one of the strongest years in BP's recent history," CEO Bob Dudley said in a statement.

Production Surge

Full-year production rose 12 percent to 2.47 million bbl/d after BP launched seven new oil and gas fields in 2017, a record year.

It is set to start up six additional projects this year including in Egypt, Azerbaijan and Britain's North Sea, helping boost production by 900,000 barrels of oil equivalent per day (boe/d) by 2021, most of it gas. It previously said it would launch five new projects this year.

Production from its U.S. shale business, which BP aims to increase into the next decade, was profitable for the first time in many years, BP head of upstream Bernard Looney said in an analysts conference.

BP was added about 1 billion boe to its reserves in 2017, the largest since 2004, thanks to six discoveries, including in Senegal and the North Sea. Its reserve replacement ratio was estimated at 143% for the year.

BP's refining and trading business, known as downstream, saw profits rise to $7 billion in 2017 as earnings for the marketing division rose by more than 10%.

"The operational performance from BP is encouraging and we expect momentum to build into 2018," Barclays analysts said in a note.

Cash flow in the fourth quarter rose slightly to $6.2 billion but fell short of market expectations, raising concerns that cost cuts have run their course, echoing concerns about rivals Royal Dutch Shell Plc (NYSE: RDS.A), ExxonMobil Corp. (NYSE: XOM) and Chevron Corp. (NYSE: CVX) which reported last week.

Payments for the Deepwater Horizon spill continued to weigh on BP, which took a $1.7 billion charge in the quarter due to higher-than-expected claims settlements, bringing the total legal and clean-up costs to $65 billion.

BP also took a one-off charge of $900 million to adjust to new U.S. tax rules, but Dudley said BP will invest more in the United States as a result.

Despite the strong start to oil prices, which reached a three-year high in January, Gilvary said he expected prices to come down between $50/bbl and $55/bbl by year-end.

BP reported a $2.1 billion fourth-quarter underlying replacement cost profit, the company's definition of net income, topping forecasts for $1.9 billion, a company-provided survey of analysts showed.

That marked a jump from $400 million a year earlier and topped a third-quarter profit of $1.9 billion.

On an annual basis, BP's profits soared to $6.2 billion from $2.6 billion in 2016.

Gearing, the ratio between debt and BP's market value, rose to 27.4% at the end of 2017 from 26.8% at the end of 2016. Net debt was $37.8 billion, up from $35.5 billion a year earlier, after the company paid $5.4 billion related to the Deepwater Horizon spill.

BP's full-year capital spending reached $16.5 billion, within the annual range of $15 billion and $17 billion it plans to maintain until 2021.