LaGuardia International Airport Terminal A for JetBlue and Spirit Airlines in New York.LaGuardia International Airport Terminal A for JetBlue and Spirit Airlines in New York.

The deal to buy Spirit Airlines was reached hours after the discount carrier decided against merging with Frontier Airlines.

The airlines will pay $33.50 a share in cash for the company.

Frontier would become the largest discount carrier in the U.S. if the regulators approve the JetBlue acquisition.

The plan to combine with Frontier was thrown into question by the all-cash bid for Spirit. The original merger plan fell apart on Wednesday, clearing the way for the new company.

After ending the Frontier agreement, the airline said it would continue talks to sell itself to another airline.

In order to compete with large carriers like American, Delta, United and Southwest, which control most of the U.S. market, JetBlue executives have argued for months.

The New York-based company wants to give the planes a new look.

It wasn't likely to be approved by regulators because of the alliance between American and JetBlue.

There is a high hurdle for the deal to clear.

After the deal was announced, the shares of Spirit were up more than 4%, while the shares of JetBlue were up less than 1%.