Mayor Rahm Emanuel and American Airlines cut a deal late Wednesday to resolve the gate dispute that threatened to hold up an $8.5 billion expansion at O’Hare Airport.

On the eve of a pivotal Aviation Committee vote on new airline use agreements needed to bankroll the massive project, Emanuel agreed to speed construction of three common-use gates that can be used by any airline, including American.

American had threatened to file a lawsuit, reduce its dual-hub operation at O’Hare — or both — to protest Emanuel’s decision to award five additional gates to hometown United Airlines. American had called that a “secret, eleventh-hour deal” that tilted the playing field in favor of United, and stifled American’s future growth at O’Hare.

American demanded that Emanuel speed construction of three additional gates for its use. Instead, the compromise will speed construction of common-use gates used by American and other airlines at O’Hare.

American spokeswoman Leslie Scott could not be reached for comment in the compromise.

The deal came together hours after former U.S. Transportation Secretary Ray LaHood urged Chicago aldermen to forge ahead with the expansion.

“This project could end up being the No. 1 project in the country — in terms of size, in terms of employing people and in terms of modernizing an airport,” LaHood said between meetings with aldermen.

“Nothing else is going on in the country right now. This is a great project and a real capstone to the runway extension,” added LaHood, who besides serving in President Barack Obama’s cabinet was a Republican congresssman from the Peoria area for 14 years.

LaHood was delivering an assist to Emanuel, one of his closest friends in politics.

“I’m not lobbying for anybody. I’m here because this is a very important project for Chicago, for Illinois, for the Midwest and for aviation. I’m not being paid by anybody. I’m doing it because this is a visionary project that will put a lot of people to work and also make O’Hare the No. 1 airport in the country.”

Ray LaHood, former U.S. secretary of transportation, speaks at the commissioning of runway 10R-28L at O’Hare International Airport. Behind him is Chicago aviation commissioner Ginger Evans. LaHood helped work out the deal that led to the runway’s construction. | Tim Boyle/For the Sun-Times

“I’ve had some conversations with American and, in the end, I hope there’ll be a good compromise,” LaHood said.

Pressed to outline what he considered to be a “good compromise,” LaHood said, “We’ll have to see. American is very important to O’Hare. O’Hare is important to American. And in the end, hopefully, they’ll reach some kind of an agreement.”

What about speeding up the three additional American gates that are already a part of the mayor’s plan, but on a longer timetable? American had said the mayor slammed the door on that idea.

“I’m not gonna get into the details of this. I haven’t been asked to negotiate it and I’m not going to,” said LaHood, who has helped broker compromise on O’Hare expansion in the past.

Two months before Emanuel took office, LaHood was instrumental in forging a political compromise that allowed a $155 million infusion of federal funding and 11th-hour concessions by a lame-duck mayor eager to cement his legacy to seal $1.17 billion worth of new construction at O’Hare, including a new south runway.

LaHood not only brokered the deal that salvaged retiring Mayor Richard M. Daley’s more modest O’Hare expansion plan. He put $155 million in new federal money on the table to make the numbers work for airlines squeezed by skyrocketing fuel prices.

Until the last-minute deal, American had been expected to come out with guns blazing at Thursday’s Aviation Committee hearing.

Mike Minerva, American’s vice-president of government and airport affairs, had been expected to reiterate his argument that the “coordinated resistance by the city and United to our request for three gates — to build gates already approved as part of the plan, but build them sooner — feeds our concern that there’s an agreement not to allow us to grow.”

Ald. Pat O’Connor (40th), Emanuel’s floor leader, said the mayor has the votes — in the Aviation Committee and in the full Council — in spite of what he called “that tempest in a teapot.”

“American and United are operating under an algorithm for gate usage in airports all across the country. You’re talking about a three or four-year period where the number of gates is pre-determined by us and the lease. After that, those gates go to an algorithm,” O’Connor said.

“There’s not a legal standard that I’m aware of that the city has to be equally good to both airlines.”

What about the threat by the Black and Hispanic caucuses to merge their political muscle to demand that minorities get their fair share of the bonanza of jobs and contracts triggered by the O’Hare expansion project?

“If they hold up the [$4 billion] bond issue, there’s no money there to fight about. If they pass the bond issue, there’s plenty of time to look at who’s getting the contracts and where the money is being spent,” O’Connor said. “Most members of the City Council realize that.”