Hawaiian Airlines’ pilots, ending more than two years of contentious negotiations, have ratified a new 63-month contract worth 42 percent more than the existing agreement.

The Air Line Pilots Association, which represents the company’s 670 pilots, said the total worth of the contract is $1.2 billion and that overall salary increases by the end of the contract term will range from 36 percent to 86 percent. The amended contract takes effect April 1 and its term extends through July 1, 2022.

ALPA said the new agreement includes improved work rules, while leaving in place vacation flexibility, sick leave accrual and “pilot-friendly” health-care premiums. The contract also includes $42.4 million in pay retroactive to the contract amendable date of Sept. 15, 2015, and a $103 million company payment to establish a pilot-run voluntary employee beneficiary association trust for retiree health care.

“With this agreement, Hawaiian pilots have finally achieved pay rates that bring us to parity with the other major carriers we compete with worldwide,” Capt. Daniel Moore, vice chairman of ALPA’s Hawaiian Airlines Master Executive Council, said today in a statement. “It is a world-class contract for a world-class airline and should make Hawaiian an attractive destination for new pilots.”

The most experienced captain (at least 12 years experience) flying the company’s largest aircraft, the Airbus A330, will see his or her hourly rate increase to $337.75 an hour by April 2022 from the current $207.13 an hour. In April 2022, that would represent a full-year salary of $303,975 to $364,770 for a pilot flying the typical 75 to 90 hours a month. That’s up from the current full-year range of $186,417 to $223,700. Entry level first officers will earn $36 per flight hour regardless of aircraft type.

For other types of aircraft, a 12-year Boeing 767 captain rate will increase to $281.46 an hour by April 2022 from the current $207.13, a 12-year A321neo captain’s salary will increase to $275.83 from $188.64, and a 12-year Boeing 717 captain’s rate will increase to $247.68 from $174.11.

A pilot’s hourly pay is calculated from the time the aircraft’s brakes are released until its brakes are set when it stops at the gate after landing.

Depending on their airplane type, pilots will receive raises from 20 percent to 45 percent when the contract goes into effect on April 1, and another raise on Oct. 1. In subsequent years, pilots will receive across-the-board 2 percent raises on Oct. 1, 2018, 2019 and 2021; and 3 percent raises on Oct. 1 and April 1, 2022.

Hawaiian and ALPA, who had not met with mediators since mid-November, reached a tentative agreement last month outside of mediation. Voting began March 6 and ended today. The new contract was approved by 76 percent of the 97 percent of the pilots who cast ballots.

“This contract amendment recognizes the contributions our pilots have made to our company, while allowing us to continue to grow and compete as a world-class airline,” Jon Snook, Hawaiian’s chief operating officer and the company’s lead negotiator, said in a statement.

The pilots and the company began direct negotiations in March 2015 in advance of the amendable date of the contract on Sept. 15, 2015. The two sides entered federal mediation in December 2015. During that time, the pilots held informational picketing at Honolulu Airport and threatened to strike in an attempt to put pressure on the company to reach an agreement. A strike could have had devastating ramifications for the state’s economy, particularly since Hawaiian services about 90 percent of the interisland travel market.

“The Hawaiian Airlines pilots’ vote to ratify a new collective bargaining agreement demonstrates the tremendous progress made possible when pilots stand united,” ALPA President Tim Canoll said in a statement.

Hawaiian, which announced the ratification results after the stock market closes, saw its shares end today up 80 cents, or 1.7 percent, at $48.45.

The company also said in a filing today with the Securities and Exchange Commission that the ratification is expected to result in a one-time cash payment of about $55 million to $60 million in the first quarter related to a ratification bonus and other benefits that will result in a financial charge up to $30 million during the quarter. Hawaiian said the charge is in addition to the $34 million special charge recorded in the fourth quarter in anticipation of the agreement.

Hawaiian is currently in negotiations with the Association of Flight Attendants, whose contract became amendable in January. The airline reached new contracts last year with three labor unions representing more than 2,200 employees