An American Airlines plane sits at a gate at Logan Airport ahead of the July 4th holiday in Boston

CHICAGO (Reuters) -American Airlines pilots have approved a new contract that includes more than $9.6 billion in total pay and benefits increases over four years, reflecting the bargaining power held by pilots in an era of airline staff shortages.

The Allied Pilots Association (APA), which represents 15,000 pilots at the Texas-based carrier, said on Monday that 72.7% of the pilots voted for the deal which will result in an immediate pay raise of more than 21%.

Overall, compensation for pilots at the airline will rise by more than 46% during the contract's duration.

"It's unprecedented and historic," the Allied Pilots Association's president, Captain Ed Sicher, told Reuters on Monday.

"For pilots the biggest victory is not just the wages but the work-life stuff."

Analysts at Jefferies estimate that the U.S. airline industry has a shortage of about 10,000 pilots. This supply-demand gap is projected to last until 2027.

With no letup in travel demand, airlines are in a rush to staff up, bolstering the bargaining power of pilots.

Rival United Airlines last month announced a preliminary deal for a new four-year contract that would give its pilots a cumulative increase of 34.5%-40.2% in pay.

American's contract includes about $1.1 billion in immediate, one-time payments and ratification bonuses.

Quality-of-life improvements represent nearly 20% of the increased value of the new contract, the union said. For example, pilots would get premium pay if the company reassigns them from a trip they bid on, or have asked to fly, Sicher said.

(Reporting by Rajesh Kumar Singh in Chicago and Allison Lampert in Montreal; Editing by Matthew Lewis)