Mayor Rahm Emanuel has averted a City Council showdown on a long-stalled airport living wage ordinance by embracing a plan to tie licenses for O’Hare Airport contractors to a “labor peace agreement” that allows 8,000 workers to join unions.

Ald. Pat O’Connor (40th), the mayor’s City Council floor leader, said the license and training plan being negotiated with the Service Employees International Union Local 1 is patterned after a similar ordinance in Los Angeles that has already survived a court challenge.

“It’s an agreement that gets signed by a company and by the city if they want to do business out at O’Hare. There’s a license they apply for. One of the pieces is they also have to have a labor peace agreement with a labor union or they have to allow the union access to their people to organize and then reach an agreement with the entity,” said O’Connor, chairman of the City Council’s Committee on Workforce Development.

“The company doesn’t have to pay a certain wage. The company . . . has to allow them to organize. We think it has a better chance of being upheld if it were challenged in court. And it is also a model that SEIU is familiar with. They feel it does give them a better opportunity to realize the gains they’re looking for,” he said.

Tom Balanoff, president of SEIU Local 1, issued a statement saying he is “working with the Emanuel administration on a process to raise standards for these hardworking men and women, because no worker at O’Hare or Midway — or anywhere in our city — should be making poverty wages.”

Ald. Ameya Pawar (47th) was so pleased with the behind-the-scenes progress, he withdrew the notice he filed with the city clerk’s office declaring his intention to try to discharge the stalled ordinance from the Committee on Workforce Development.

Any ordinance held in committee for more than 60 days can be moved to the floor with a simple majority of 26 votes, the same number of votes needed to approve the ordinance.

With 24 co-sponsors as a starting point, Pawar believed he had the votes to force the issue — even without Emanuel’s support.

Now, the showdown has been averted.

“We negotiated with them, in my opinion, because we felt the ordinance they had was flawed and this was a better approach. We also did it to avoid the confrontation,” O’Connor said Tuesday.

Organized labor’s City Council allies and unions seeking to represent airport workers have held a series of O’Hare protests to press their pay demands and claim $1.2 million in “wage theft” from hundreds of airport employees.

The alleged “theft” by private contractors includes everything from failing to make up the difference for tipped employees whose gratuities leave them short of the city’s minimum wage to failing to pay employees who work through their lunch breaks and before and after their regular shifts.

United Maintenance Co. Inc., a clout-heavy janitorial contractor nearing the end of a five-year O’Hare deal, has lent credence to the wage theft claims by agreeing last year to shell out nearly $850,000 to settle a federal wage-theft lawsuit brought by its O’Hare employees.

Like the stalled ordinance, the compromise will not mandate those terms for airport contract employees. But it could open the door to just that.

“I believe there is a roadmap to guarantee union protections, a living wage, union rights and basic dignities like paid sick leave and other worker benefits for over 8,000 workers at the airport,” said Pawar, a Democratic candidate for governor. “If this deal gets done, this could be one of the biggest wins for workers and organized labor in the country in recent years.”