CHICAGO, May 21 (Reuters) – Southwest Airlines Co’s mechanics union said on Tuesday its members had overwhelmingly voted to ratify a tentative contract agreement with the airline, ending seven years of labor negotiations fraught with legal disputes and flight disruptions.

The agreement came a day after rival U.S. carrier American Airlines Group Inc said it was filing a lawsuit against its own mechanics alleging an illegal slowdown aimed at disrupting operations to improve their position in labor talks, which began in 2015.

Analysts have highlighted labor issues as a main concern for airlines this year.

Mechanics at both American and Southwest have complained that the airlines are moving to outsource maintenance work that has traditionally been done in-house.

In a statement on its website, the Aircraft Mechanics Fraternal Association, which represents around 2,500 Southwest mechanics, said about 95 percent of its members had voted to accept the labor agreement.

Separately on Tuesday, American Airlines’ mechanics association said it was “ready and willing” to negotiate a fair contract.

“We would much prefer to be at the negotiating table than in a legal battle brought on by American,” the TWU-IAM Association said in a statement.

(Reporting by Tracy Rucinski Editing by Susan Thomas and Bill Berkrot)