Spirit Airlines shareholders voted Wednesday to accept a $3.8 billion buyout from JetBlue Airways, but the deal could still face a challenge from federal antitrust regulators.

JetBlue emerged as the winner in a bidding war with Frontier to acquire Spirit, the nation’s biggest budget airline.

Spirit announced the outcome after a brief meeting, which was held online. Spirit said only that the JetBlue deal was supported by a majority of shares voted; it promised an exact count within four business days.

Wall Street widely expected shareholders to approve the sale after they forced Spirit to drop a proposed merger with Frontier Airlines in favor of JetBlue’s richer, all-cash offer.

“This is an important step forward on our path to closing a combination that will create the most compelling national low-fare challenger to the dominant U.S. carriers,” Spirit CEO Ted Christie said after the vote.

JetBlue issued a statement calling the vote “a major milestone in our plan to join with Spirit to create a high-quality, low-fare national challenger to the Big Four airlines” — a reference to American, United, Delta and Southwest. JetBlue vowed to work through the regulatory process.

JetBlue is expected to repaint Spirit planes and fold its pilots and other employees into the JetBlue workforce. The deal would make New York-based JetBlue the nation’s fifth-biggest airline with more than 450 planes and about 7,000 pilots and — it hopes — help it win customers from the bigger airlines.

However it would also eliminate Spirit, the nation’s biggest budget carrier, and that might not sit well with regulators, who appear to oppose any further consolidation in the airline industry after a round of mergers between 2005 and 2016.

The Justice Department is currently fighting to kill a partnership in New York and Boston between JetBlue and American, which the airlines call the Northeast alliance or NEA. Department lawyers say the alliance is anti-competitive and will drive up prices for consumers. A trial that began last month in federal court in Boston resumes Monday.

The outcome of the NEA trial could have a huge impact on whether the Justice Department lets JetBlue buy Spirit or sues to block the sale, according to Florian Ederer, an antitrust expert and economics professor at Yale University.

“If (JetBlue and American) win the case, and the judge thinks the NEA does not harm consumers enough, it’s almost guaranteed that there will be an antitrust challenge to the Spirit acquisition,” Ederer said.

JetBlue argues the alliance with American should be allowed because it’s not a merger. The acquisition of Spirit, however, would merge two airlines.

JetBlue CEO Robin Hayes has said he is confident of winning regulatory approval to buy Spirit. The airlines hope to close the sale in the first half of 2024.

Spirit and Frontier announced their planned merger in February. Both are so-called ultra-low-cost carriers that charge lower fares than other airlines but tack on more fees to make up some of the difference.

JetBlue, which tried to buy Virgin America in 2016 but lost a bidding war with Alaska Airlines, topped Frontier’s stock-and-cash offer in April. JetBlue overcame the opposition of Spirit’s board and management to drive out Frontier.

The JetBlue offer calls for Spirit shareholders to get $33.50 per share in cash, including an advance of $2.50 per share upon approval of the deal by Spirit shareholders, plus a “ticking fee” of 10 cents per share per month while regulators review the matter.

If regulators kill the sale, JetBlue would pay $70 million to Spirit, which is based in Miramar, Florida, and $400 million to Spirit shareholders.

Even after losing the bidding war, Frontier is likely to benefit from the Spirit sale. If Spirit disappears, Denver-based Frontier will become the nation’s biggest budget airline, catering to the most price-sensitive travelers.