The merger of Alaska (ALK) - Get Report and Virgin America (VA) first received an indication of eventual approval by the Antitrust Division of the Justice Department in mid-October, when the parties reached an agreement in principle, sources said.

Under that agreement, the department continued to review aspects of the code-share agreement between Alaska and American (AAL) - Get Report , but the possibility of divestitures of other assets such as gates or slots at congested airports was off the table, said two sources who were familiar with the negotiations and who asked that their names not be used.

After that, "the decree took a while due to the code-share issues," said a source. "{DOJ} honed in on this one issue and turned over every stone {and} took time to work through it."

The DOJ and Alaska announced Dec. 6 that they had reached a settlement that required Alaska to reduce the scope of its code-share with American Airlines and also to undergo additional review if it seeks to divest any of the assets which DOJ awarded to Virgin America as part of the 2013 American/US Airways divestiture.

In a court filing on Dec. 6, DOJ said its intent was to preserve Virgin America's competitive approach to pricing. It particularly sought to prevent single-carrier service in markets where Virgin America had kept pressure on fares.

Despite continuing speculation that Alaska and Virgin America might be forced to give up gates or other vehicles for access at congested airports, that was never a consideration once the agreement in principle was reached, the source said.

Nor was Donald Trump's election as president. Some have speculated that DOJ perceived a need to settle on generous terms after the election, and rushed to announce the Dec. 6 ruling. "The election had nothing to do with it," one source said.

It took eight months for approval, about the same amount of time it took regulators to approve the American/US Airways merger three years earlier.

In both cases, the parties fashioned settlements that enabled both parties to declare victory and that sought to preserve competition even while enabling the U.S. airline industry to continue on the path of consolidation it has followed since its creation in the 1920s.

The Alaska/Virgin America merger will make Alaska the fifth-largest U.S. airline, with about 6% of U.S. capacity. The four largest airlines control about 80% of capacity.

Potentially, Alaska could one day become a fifth national airline. But the sources said regulators wanted to be sure that Alaska could remain a strong competitor in its current West Coast markets.

In California, Southwest is the biggest internal carrier. The three global U.S. carriers battle fiercely and continue to expand at Los Angeles International Airport and United operates a major hub at San Francisco International Airport.

"Southwest jokes that they have a California airline headquartered in Texas and {American, Delta and United} battle tooth and nail for California," one source said. "Together, Alaska and Virgin can compete against these four."

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.