Spirit Airlines, JetBlue merger blocked by federal judge. Here's why.

A federal judge is siding with the Biden administration and blocking JetBlue Airways from buying Spirit Airlines, saying the $3.8 billion deal would reduce competition.

The Justice Department sued to block the merger, saying it would drive up fares by eliminating Spirit, the nation’s biggest low-cost airline.

JetBlue said it disagreed with the ruling and was considering whether to appeal.

The New York carrier argued that it needs the deal to compete better against bigger rivals that dominate the U.S. air-travel market.

Related: JetBlue's CEO stepping down, will be replaced by first woman to lead a major US airline

"We continue to believe that our combination is the best opportunity to increase much needed competition and choice by bringing low fares and great service to more customers in more markets," JetBlue said in a statement.

The ruling was a victory for the Biden administration, which has moved aggressively to block consolidation in several industries, arguing that it hurts consumers. In the airline case, the Justice Department said if JetBlue were allowed to buy Spirit, it would especially hurt travelers who depend on Spirit’s low fares.

U.S. District Judge William Young, who presided over a non-jury trial last year, said in the ruling Tuesday that the government had proven that the merger "would substantially lessen competition" and violated a century-old antitrust law.

"Spirit is a small airline. But there are those who love it. To those dedicated customers of Spirit, this one’s for you," Young wrote.

Shares of Spirit Airlines Inc. plunged more than half almost immediately, while JetBlue shares gained 8%.

For JetBlue, the ruling was its second major setback in federal court in less than a year. Another judge in the same Boston courthouse killed a partnership in the Northeast between JetBlue and American Airlines.

JetBlue, the nation’s sixth-largest airline by revenue, now must come up with another growth plan. That will be an assignment for incoming CEO Joanna Geraghty. Next month she will replace Robin Hayes, who had engineered both of the deals that have now been blocked in court.

Tuesday’s ruling could open the door for Frontier Airlines to make another attempt to buy Spirit. The two budget airlines announced a cash-and-stock deal in 2022, only to have JetBlue make an all-cash offer and win a bidding war for Florida-based Spirit.