Southwest Airlines Co. (LUV) - Get Report on Monday reached an agreement in principle with its pilots union, as the two sides try to make peace after four years of increasingly rancorous negotiations.

The Southwest Airlines Pilots Association said that final wording of the contract is still being hashed out, but that the union's board expects to meet in mid-September to review the offer and decide whether to send it out for a vote. The pilots last November rejected a proposed contract that would have made them the best paid in the industry, and it is far from certain that this latest attempt will mollify enough concerns to win approval.

The union said that the agreement, which would run through August 2020, would provide pay-rate increases back to 2013, retroactive pay, and future raises that the group described as "market rate" compared to what pilots make at Delta Air Lines (DAL) - Get Report , United Continental (UAL) - Get Report and American Air Group (AAL) - Get Report . There are also changes in the retirement plan and, controversially, provisions that would allow Southwest to form limited partnerships and codeshare with other airlines on certain international routes.

The previous agreement was rejected by more than 60% of union workers despite a significant pay raise in large part because Southwest included the ability to enter into codeshares. This latest deal could be more palatable because it appears to have limited the scope of potential codeshares. It also includes retroactive pay, something that was missing from the previous agreement.

"While a new contract is certainly not a done deal, this is the next step in the process," SWAPA president Jon Weak said in a statement. "Thanks in equal part to our economically justifiable position and unified pilot group, our negotiators were able to bring back an agreement worthy of review and discussion by our board of directors. However, the membership will have the final decision as always."

The tentative agreement comes just a week after pilots held a massive demonstration outside of Southwest's headquarters at Dallas' Love Field, and follows months of rhetoric between the two sides. The SWAPA was one of a number of unions earlier this year to call for the ouster of Southwest CEO Gary Kelly.

The labor issues are also beginning to take a toll on Southwest's operations. Shares of the airline dropped by more than 10% in a single session in mid-July after Southwest reported quarterly profit and revenue that missed expectations, and more importantly offered up little in the way of specifics about what management intended to do to boost margins.

Many analysts at the time linked Southwest's inability to offer up details about how they intended to alter operations to the uncertainty surrounding the airline's labor contracts. Getting the pilots on board would offer the airline greater clarity as to its future, and could make it easier for the company to do long-range planning.

In addition to its pilots, Southwest is also negotiating new deals with its flight attendants and mechanics.