BERLIN (Reuters) - Lufthansa LHAG.DE and its main pilots' union put an end to years of wrangling over pay, pensions and conditions on Tuesday, signing a wide-ranging agreement which is expected to reduce staff costs and boost the airline's profits this year.

FILE PHOTO: Planes of the Lufthansa airline stand on the tarmac in Frankfurt airport, Germany, March 17, 2016. REUTERS/Kai Pfaffenbach/File Photo

The signing of the deal, which is valid until 2022 and therefore rules out strikes before then, boosted shares in Lufthansa, sending them up 3.5 percent to a fresh 16-year high of 24.92 euros.

Lufthansa has been trying to bring down costs to better compete with leaner rivals on both short and long-haul routes.

But its efforts to overhaul its labor agreement with the Vereinigung Cockpit union, which represents about 5,400 pilots at its Lufthansa, Germanwings and Cargo subsidiaries, had led to repeated strikes over the last few years.

The two sides came to a framework agreement in March but the exact details required further work. The collective labor agreement will now be put to union members for a vote, a process which is expected to take until mid-December.

The deal includes a shift from a defined benefit to a defined contribution pension scheme, more flexible working hours and aims to increase the average retirement age of pilots.

It will bring Lufthansa’s cockpit staff costs down by 15 percent and reduce pension liabilities this year by a high three-digit million euro amount, while earnings before interest and tax will be increased by a significant three-digit million euro amount.

“Better cost structures, especially on short-haul routes, will improve the market position of Lufthansa,” Vereiniung Cockpit board member Joerg Handwerg said in a statement.

In exchange Lufthansa said at least 325 of its planes will be flown by pilots under the new German collective agreement and therefore means it will start hiring junior pilots again.

Pilots at Lufthansa, Lufthansa Cargo and Germanwings will receive pay increases in stages totaling 10.3 per cent, plus a one-off payment of up to 1.8 times their monthly salary, for the period from May 2012, when the last collective labor deal expired, until June 2022.

“This compromise opens up career prospects for our pilots and makes an important contribution to the competitiveness of our company,” Lufthansa personnel head Bettina Volkens said in a statement.