JetBlue Airways Corp. agreed to sell Spirit Airlines Inc.’s operations at New York’s LaGuardia Airport to rival carrier Frontier Group Holdings Inc.

The deal is contingent upon JetBlue closing a planned $3.8 billion acquisition of Spirit, according to a statement Thursday. JetBlue had earlier pledged to divest some assets to help secure federal approval of the acquisition, which has been challenged by the US Justice Department over concerns it would hurt consumers and reduce industry competition.

The sale is something of a consolation for Frontier, which had agreed to acquire fellow ultra-discount carrier Spirit before JetBlue came in with a higher offer. Spirit shareholders backed the JetBlue bid after it added a series of sweeteners, including special dividends. 

The agreement will let Frontier “significantly expand” its LaGuardia operations, Chief Executive Officer Barry Biffle said in the statement.

Spirit’s holdings at LaGuardia include six gates and 22 takeoff and landing slots. The flying rights are highly sought within the industry because they’re limited and difficult to acquire. JetBlue also agreed previously to give up some Spirit assets in Boston and Florida.

JetBlue is offering concessions because of the overlap of its operations and Spirit’s in certain markets. A combination of the carriers is the only way it can gain the size and heft to compete with the nation’s three largest airlines that control about 80% of the market, JetBlue has argued.

JetBlue, Spirit and Frontier shares each rose less than 1% after regular trading hours in New York.

JetBlue reiterated that it expects to close the Spirit transaction in the first half of 2024. An Oct. 16 trial date has been set for the Justice Department challenge.