Qantas Airways posted one of the fastest turnarounds in Australian corporate history with a return to full-year profit and said it will buy eight fuel-efficient Boeing 787-9 Dreamliner jets, enabling it to fly the longest routes possible.

The Australian flagship carrier also said it would make its first cash payout to shareholders in six years after an aggressive cost-cutting programme and tailwinds from cheaper fuel costs led the company back into the black.

Pre-tax profit of A$975m (£456m, $712m) for the year to end-June was slightly under analyst forecasts of A$982m but a sizeable and swift recovery from the A$646m underlying loss the so-called Flying Kangaroo reported just a year ago.

While oil prices at multi-year lows helped cut fuel costs by A$597m, chief executive Alan Joyce took the credit for his controversial plan to cut 5,000 jobs, trim capacity, raise fares and overhaul the airlines frequent flyer programme.

To date, $1.1bn in cumulative transformation benefits have been realised including $894m of benefits unlocked in financial year 2015 alone, Joyce said. This means that if it wasnt for our transformation program, Qantas would not be announcing a profit today, nor would we be announcing a return to shareholders, nor would we be announcing the acquisition of the 787s.

Qantas had postponed plans to refresh its ageing fleet of 11 Boeing 747s used on long-haul flights with the 787-9s when it was in financial difficulty. The airline has another 12 options for 787-9s from 2017 and a further 30 purchase rights.

This transformation was all about getting our foundations right, being smarter with our cost, faster with our decisions, more productive with our assets and on these stronger foundations we can build a much stronger Qantas, Joyce added.

Qantas shares rose up to 3.7% to their highest intraday level since 2008 before dipping 1%, outperforming the broader market decline of 1.4%. According to Thomson Reuters data, the shares have soared 200 percent in the past year, the fourth-best performing airline stock among 47 large and midcap airline companies.