You are probably surprised by the title of this article; after all, why should shareholders thank a government department that filed a lawsuit against their company? But the story of AMR (NASDAQOTH: AAMRQ), parent company of American Airlines, shareholders is more complex than a simple merger agreement.

And in this process, the lawsuit filed by the Department of Justice has quite likely increased the returns for AMR shareholders.

Bankruptcy merger
When American Airlines filed for bankruptcy in 2011, the market wrote off the common stock as worthless based on past results from previous airline bankruptcies. But the American Airlines bankruptcy was no ordinary airline bankruptcy. The airline sought reorganization while still having nearly $4 billion in cash and no immediately maturing debt.

The smaller US Airways (NYSE: LCC) saw an opportunity here to buy its larger rival out of bankruptcy in a move that would give the former a greater international presence as well as a stronger domestic network. The courtship continued for more than a year with US Airways as the suitor and American Airlines as the semi-interested acquisition target.

In early 2013, US Airways and AMR agreed to merge in a move that had been growing increasingly likely. But unlike previous bankruptcies, this merger plan called for AMR common shareholders to receive 3.5% of the new American Airlines Group (AAG) plus additional equity based on the value of US Airways stock.

DOJ lawsuit
Just prior to the announcement of the DOJ lawsuit, US Airways shares changed hands in the $18 range. Although the lawsuit temporarily sent the stock down, shares recovered and have been steadily rising along with a broader rally in airline stocks. Prior to the settlement announcement, US Airways shares traded in the $22 range, around 20% above their levels prior to the initial DOJ lawsuit filing.

AMR shareholder returns
At first glance, you may think this means that AMR shareholders are simply getting 20% more and that, had the DOJ lawsuit never been filed, AMR shareholders could have just held their newly issued AAG shares for an equivalent 20% rise.

But the percentage of the total equity in the new AAG that AMR shareholders receive increases as US Airways shares rise. According to the AMR bankruptcy documents, with US Airways shares at $18, AMR shareholders would together receive 14.9% of the new AAG. But with US Airways shares at $22 each, AMR shareholders together receive 28.7% of the new AAG.

As with many parts of investing, timing is everything since the percentage of the new AAG that AMR common shareholders receive is determined by the price of US Airways shares at the time of the merger transaction.

Industry rally
The DOJ lawsuit effectively delayed the US Airways/AMR merger by a few months giving US Airways shares a chance to benefit from another leg of the airline industry rally. This same period saw share of Delta Air Lines (DAL 0.43%) rise from around $20 into the upper $27 range. Both US Airways and Delta Air Lines reported solid earnings giving further evidence to the airline bull thesis helping to fuel this portion of the rally.

Merger happenings
In the end, it appears the merger between US Airways and American Airlines parent AMR will go forward. And when we further examine the terms of the merger agreement, it becomes clear that this delay of a few months has made AMR shares far more valuable than they would have been if the merger transaction had been completed earlier.

Clearly, the DOJ's intentions were not about seeking out value for AMR common shareholders and this was merely a side effect of delaying the merger in a bid to extract concessions from the merging airlines. But the lessons from this episode should be kept in mind for future investments where an unexpected event results in the delay of a transaction. And as with so many other parts of investing, it once again shows that it pays to know what you own.