Clandestine meetings, covert operations, secret telephone calls.

It could be a Hollywood script, but it is the real-life story of how US Airways Group snagged a merger deal with bankrupt American Airlines.

There was even a code name used by US Airways and its advisers when communicating internally about their strategy - "Tetris," named for a video game using squares to fill in spaces in a grid.

Tetris stood for the gaps in US Airways' and American's route networks, the Midwest and East Coast, respectively.

US Airways set its sights on combining the same day that American filed for bankruptcy reorganization, Nov. 29, 2011.

A key turning point was the support by American's labor unions. American pilots' former president, Capt. David Bates, and flight attendants' president Laura Glading met a week apart in New York with US Airways president Scott Kirby.

American pilots also had a code name for the private talks: "Buffalo," a reference to Buffalo, N.Y., where American flew but had few connections to the eastern seaboard.

Here is how the deal went down.

Among American's many lawyers was Harvey R. Miller, who over the decades had made Weil, Gotshal & Manges in Manhattan a powerhouse in bankruptcy law, involved in such notable bankruptcies as Texaco, Drexel Burnham Lambert, R.H. Macy, Enron, and Lehman Brothers.

In 2005, as managing partner at the investment bank Greenhill & Co., Miller represented then-America West CEO Doug Parker in acquiring US Airways in Chapter 11.

This time, Miller was on the other side.

In January 2012, US Airways had assembled its team: Latham & Watkins, corporate and bankruptcy lawyers, among others; Barclays, the investment bank, and Millstein & Co., restructuring experts led by Jim Millstein, the former U.S. Treasury official who engineered the federal government's restructuring of American International Group (AIG).

From the start, US Airways knew two things: American was not in such bad financial shape that it couldn't exit bankruptcy as a standalone company, and that American would resist a merger.

Setting the trap

Parker telephoned American CEO Tom Horton early on to say there were advantages to merging the two companies in Chapter 11. Horton said not now, maybe later.

"In light of the unwillingness of Horton to open the front door, we devised a strategy to get in through the backdoor," said Millstein. "That was to go directly to American's most important creditors, its unions, and then its bondholders."

The strategy was to convince anyone who would listen that a merger made financial sense. US Airways was the fifth-largest U.S. airline. American was No. 3. Together they would be No. 1.

In February, Kirby, the US Airways president, made power-point presentations to Wall Street analysts and aviation industry consultants. The pilots' union at American heard about Kirby's presentation - and asked for a briefing.

American was seeking deep concessions from its workforce. The unions agreed to pay-and-benefit cuts in 2003 to keep American afloat, and had been negotiating since 2008 for new contracts.

Bates and another American pilot, Dennis Tajer, met Kirby for dinner March 12 in a secluded dining room at Oceana restaurant in New York.

"We talked about all the important stuff, the network stuff - how if you integrate the US Airways and American networks, we will be No. 1 in the East and No. 1 in the center of the country, and No. 3 in the West," Bates said. "They were going to offer us a significantly better compensation package than American was willing to. So there wasn't much not to like.

"Kirby asked, 'What's next?' I said, 'Let's meet with Mr. Parker and let's do it as soon as we can.' "

Bates flew to Phoenix, where US Airways is based, with union vice president Tony Chapman and had dinner with Parker. Soon after, a large union contingent went back to Phoenix. "Security was a big thing," Bates said. "I was careful to brief my whole team - no insignias, nothing that says American Airlines on it. Don't talk to anybody."

Bates also flew to Charlotte, N.C., to speak to 60 or 70 national officers and negotiators of the US Airways' pilots union. "They wanted to be part of the process. I said, 'That's why I'm here. We are going to bring you in.' "

US Airways approached the unions after American filed in bankruptcy court to terminate existing labor contracts. In that document US Airways learned what American had offered its unions.

"We knew what the 'ask' was and, therefore, the bar over which we had to jump in order to get the unions' allegiance," Millstein said.

Big surprise

Laura Glading, president of the American flight attendants, and airline economist Dan Akins, met Kirby for dinner in New York on March 19.

"We listened attentively. From that point on, I thought this was just a great idea, something both companies really need to do," she said.

The pilot and flight attendant leaders went to Phoenix on the same day in early April. "We negotiated a contract with US Airways that week," Glading said.

US Airways chief operating officer Robert Isom was in Dallas - near American's home base - at the same time, negotiating a contract with the Transport Workers Union representing American's mechanics and fleet service workers.

On April 20, US Airways and American's three largest unions, representing 55,000 employees, announced that they had signed conditional labor agreements, if a merger occurred.

"What are business schools going to say about this? How do you so thoroughly lose all your employees?" Glading mused. "Think about it: All three unions went off and cut a deal with another company? It's a critical message."

AMR Corp., American's parent, was caught by surprise.

"In retrospect, they did a very clever thing," said Miller, American's lawyer. "By tying up labor, it gave US Airways enormous leverage. And that, combined with the fact the labor unions essentially controlled the creditors' committee, was a very powerful weapon."

Art of the deal

From May through July, US Airways did several things that caused the creditors committee to persuade American to at least evaluate a merger.

US Airways lobbied the creditors, and began a media outreach, including meeting with newspaper editorial boards. In July, Parker spoke at the National Press Club, joined by American's unions.

The airline met with elected officials, civic and business leaders in Washington, Philadelphia, and Charlotte, where US Airways has hubs, and Miami and Dallas, which are American hubs. Duane Morris L.L.P. provided legal and lobbying advice in Pennsylvania. Dechert L.L.P. provided antitrust advice.

Horton announced in July that AMR would evaluate strategic alternatives and asked interested parties to sign non-disclosure agreements to exchange financial information.

In the fall, the creditors and both airlines talked about the economic benefits of a merger. US Airways estimated $1.4 billion in annual cost savings on $40 billion in revenue.

In November, US Airways offered a 70-30 equity split. American countered with 80-20, but hinted that it would consider 75-25.

In the merger announced Feb. 14, American creditors will own 72 percent, and US Airways shareholders 28 percent in an all-stock transaction.

"A critical issue was the value of synergies," Miller said. "You were talking very significant numbers - in the billions."

"As the Chapter 11 case progressed, American became stronger in terms of its operations," Miller said. "Mr. Horton was able to put into place new practices, a reduced infrastructure, and the airline responded very positively. That created more leverage on the American side, so that you ultimately got to the 72/28."

Horton wanted to be the CEO, as did Parker. Horton, who is getting a nearly $20 million payout, will serve as chairman until the first annual shareholder meeting in 2014.

"It was clear that Doug Parker started this process with the intention that if there was a consolidation, he would be the CEO," Miller said. "Tom Horton did not become CEO until a few days before the filing of Chapter 11. Doug has a record - he took over America West. He acquired US Air. He did a very admirable job in keeping that airline economically viable."