Chicago is on the verge of striking a historic $8.5 billion deal with airline carriers at O’Hare to give the airport its largest-ever terminal expansion, adding dozens of gates and 3 million square feet to its footprint.

Central to the plan to modernize and grow the airport is the construction of a new Global Terminal, which would replace Terminal 2 and serve larger aircraft for international flights, according to a source with knowledge of the deal.

The sprawling new facility would include better amenities, better security and more gates to more efficiently serve a larger number of passengers.

The expansion would be complete by 2026, and the work could potentially create tens of thousands of jobs over the next eight years, the source said. It could also give O’Hare a chance to rise above its routinely dismal ranking for on-time flights.

The deal comes as the city nears the end of a 34-year lease agreement with the airlines that expires May 11. A new 15-year lease agreement would take its place.

“Our discussions with the city about the future of O’Hare are ongoing and we look forward to sharing the details about our opportunities to grow in Chicago once the negotiations are completed,” American Airlines spokesperson Leslie Scott said in an email.

A United Airlines spokesperson also cited the ongoing negotiations in an emailed statement.

“We look forward to continuing to work collaboratively in order to finalize an agreement that will mean continued investment at O’Hare and a world-class airport for the traveling public and people of Chicago,” the spokesperson said.

Funding for the O’Hare expansion would come from the airlines and the revenue they bring in, the source said. No taxpayer money would be used. When all is said and done, the number of gates at O’Hare would grow from 185 to as many as 220.

City Hall has been negotiating the deal to expand O’Hare, which first opened to commercial air traffic in 1955, for more than a year. The airport has clearly been a priority for the mayor.

Emanuel recently touted O’Hare as the “best connected airport” serving a city with the “most diversified economy.” In 2016, he called it the “economic engine of Chicago” as he announced the groundbreaking of a new O’Hare runway expected to help reduce delays and increase the airport’s capacity.

More recently, the mayor has said he could deliver on the long-elusive dream of a high-speed rail line between downtown and O’Hare.

Four powerhouse firms,including Elon Musk’s The Boring Company, have shown interest in designing, building, financing, operating and maintaining an express train.The city is hoping for a travel time of 20 minutes or less, with express trains running every 15 minutes for most of the day at fares cheaper than a taxi or Uber ride.