BP Plc (NYSE: BP) will become the first major European oil and gas company to resume share buybacks since the 2014 price slump, a sign years of austerity have paid off.

BP’s decision comes after the British oil company reported a doubling in third-quarter profit and in a week crude prices hit two year highs above $60 a barrel (bbl).

Coupled with strong growth in its oil and gas production and cash flow, the resumption of buybacks in the fourth-quarter lifted BP’s shares to their highest in over three years, when oil prices were still around $100/bbl.

The move comes as BP gradually shakes off the impact of the deadly Deepwater Horizon spill in 2010, known as Macondo, which cost it over $63 billion in clean-up costs and penalties.

“After three years of oil price correction and seven years after Macondo we are now back into more normal state of growing the business in current environment and we can deal with prices that go lower,” Brian Gilvary, BP’s CFO, said.

BP is the first among Europe’s top oil and gas companies to reintroduce buybacks, although some are making other moves to woo shareholders. Norway’s Statoil (NYSE: STO), for example, has said it will stop offering a “scrip” dividend - paid in shares rather than cash - in the fourth-quarter, while France’s Total SA (NYSE: TOT) plans to do so in 2018. Royal Dutch Shell (NYSE: RDS.A) will report results on Nov. 2.

“Today’s announcement is a very positive surprise, emphasizing the progress made in the reset of the BP in the aftermath of Macondo and in the context of lower oil prices,” UBS analysts said.

In one of the clearest signs yet that the oil company has turned a corner; BP said it was able to balance its books so far this year at $49/bbl, excluding Macondo payments, as years of cost cuts pay off.

Four months ago, BP’s breakeven level was still at around $60/bbl.

BP will be able to balance its books at $50/bbl or even $45/bbl in 2018, Gilvary said.

The London-based firm is working on an assumption Brent crude will average $50/bbl to$55/bbl in 2018 as global inventories gradually return to normal, he added.

The fortunes of Europe’s other top oil and gas companies diverged in the third-quarter, with Italy’s ENI (NYSE: E) and Statoil missing profit expectations, while Total benefited from higher production and an increase in earnings at its huge downstream business.

BP also got a boost from growing production after it started six major projects in 2017, as well as lower payments for the Macondo spill.

BP’s oil and gas production in the first nine months of the year rose by more than 9.6% from a year earlier to 2.427 million barrels of oil equivalent.

It also saw improved earnings in its downstream business where refinery profit margins rose sharply after Hurricane Harvey knocked out around a quarter of U.S. refining capacity for several weeks.

At 4:15 a.m. CT, BP shares were up 3.6% at 519.71 pence (US$ 6.87), after trading as high as 522.2 pence (US$ 6.90).

The oil major reported third-quarter underlying replacement cost profit, the company’s definition of net income, of $1.87 billion, exceeding analysts’ forecast of $1.58 billion.

The company generated $1.8 billion in surplus cash over the first nine months of 2017, compared with $1.4 billion in shares issued as part of the scrip dividend.

As of the current quarter, BP will buy back the equivalent number of shares it is issuing as part of its scrip dividend scheme through which investors can opt to receive dividend payouts in shares rather than cash.

It will buy back around $1.6 billion worth of shares a year in order to offset the dilutive effect of the scrip dividend program, Gilvary said.

“The move to start buybacks is welcomed by us to neutralize the scrip dividend and reduce the discount the market puts on the yield,” Rohan Murphy, energy analyst at BP shareholder Allianz Global Investors, said.