JetBlue Airways has offered to buy Spirit Airlines for about $3.6 billion and break up a plan for Spirit to merge with rival budget carrier Frontier Airlines.

Spirit said Tuesday that it received an unsolicited bid from JetBlue. It said its board will evaluate the offer and decide what’s best for shareholders.

In a statement, New York-based JetBlue said combining with Spirit would lead to lower fares by creating “the most compelling national low-fare challenger” to the nation’s four biggest airlines: American, Delta, United and Southwest.

Frontier used that same argument in February to support its proposed acquisition of Spirit, saying that creating the nation’s fifth-biggest airline would save consumers $1 billion a year.

JetBlue offered $33 per share in cash, which it said puts a 37% higher value on Spirit than does the Frontier offer. However, Frontier’s bid would let Spirit shareholders keep 48.5% of the combined airline. Frontier said its cash-and-stock offer was worth $2.9 billion, although a dip in Frontier’s shares has reduced its value since February.

Shares of Florida-based Spirit soared 22% after The New York Times first reported the JetBlue bid Tuesday. JetBlue shares fell 7%.

A Frontier-Spirit tie-up would combine Denver-based Frontier’s route map in the western United States with Spirit’s network along the East Coast and the Caribbean. Both are budget airlines that offer rock-bottom fares and make up some of the difference by charging extra for many things that bigger airlines include in the ticket price, including carry-on bags and soft drinks.

JetBlue is not the same kind of so-called ultra-low-cost-carrier. Its base fares are generally higher than those on Frontier and Spirit, but it offers amenities they don’t, including free TV and free internet at every seat.

JetBlue’s strength on the East Coast, including Florida, would mean much more overlap with Spirit. In a statement Tuesday, Frontier argued that would lead to less competition, higher fares and fewer options for travelers.

Moreover, Frontier and Spirit are small enough that their deal might not get close scrutiny from antitrust regulators, although several leading liberal Democrats in Congress raised concern about the merger to the Biden administration. The Justice Department and several states sued last year to try to block a much more limited partnership between JetBlue and American Airlines — that challenge is pending.

Colin Scarola, an analyst who covers airlines for CFRA Research, said the Biden administration is more likely to oppose a JetBlue-Spirit deal than a Frontier-Spirit combination because it could lead to higher prices.

However, he views the JetBlue offer as superior, and so “Spirit will likely take the risk and accept the JetBlue bid. It’s just too much more money to pass up.”

JetBlue is three times bigger than Frontier and nearly twice the size of Spirit. It has failed before in acquisitions, having lost out in its bid for Virgin America to Alaska Airlines.

Frontier is controlled by private equity firm Indigo Partners, which once owned a major stake in Spirit.

One area where all three are similar: consumer complaints. Spirit had the highest rate of complaints to the U.S. Transportation Department last year, followed by JetBlue and Frontier.