Alaska Airlines can go ahead with its $2.6 billion acquisition of Virgin America, the Justice Department said Tuesday — as long as it agrees to limit its cooperation with American Airlines.

Over the last decade, the DOJ has allowed the merging of American airline industry to go ahead with minimal interruption, approving mega-deals like Continental's merger with United, typically with some strings attached. The result has been a consolidation frenzy that reduced America's nine biggest airlines down to four major players.

Alaska's deal to buy Virgin, first announced this spring, wouldn't put the Seattle-based airline into the same territory as United, American, Delta, or Southwest. But it would create a competitor with a strong regional footing on the West Coast, and Virgin's transcontinental routes and landing slots at major airports in California. The result would be competitive with JetBlue, occupying the fifth place in the US market.

The DOJ didn't exactly approve the merger on Tuesday — technically, it sued in the DC District Court to stop the deal. But as part of the filing, it proposed a settlement agreement that would remove the need for a legal battle.

The deal would be good for competition, the Justice Department said, creating a stronger airline that could better compete with the biggest national carriers. "Smaller airlines, such as Alaska and Virgin, provide a critical competitive check on the larger carriers," Renata Hesse, the head of the Antitrust Division of the Justice Department, said in a statement.

But Alaska is currently working closely with American, with a codesharing deal that covers over 250 US routes. On those routes, there are incentives "to compete less aggressively" and "to forgo launching new service in competition with American," the DOJ said, which leads to the two airlines acting more like "partners than competitors."

By shrinking the codesharing between Alaska and American, the Justice Department said it would ensure that "Alaska will have the incentive to vigorously compete with American as Virgin does today."

Alaska seems happy to accept the proposal. In a statement, the airline said the DOJ's requirements would not be a serious hit to its business.

"The majority of Alaska and American codeshare flights will remain intact," the company said. "The DOJ did not require changes to any other agreements between Alaska and American, including interline or reciprocal loyalty agreements, or any of Alaska's other airline partnerships."

Matthew Zeitlin is a business reporter for BuzzFeed News and is based in New York. Zeitlin reports on Wall Street and big banks.