Sydney Airport has bought back the lease of domestic terminal 3 from Qantas Airways for $535m, effective from 1 September.
The deal comes four years before the airways' 30-year lease of the terminal expires in June 2019, but allows Qantas to manage it until that period.
Qantas will continue to have exclusive user rights on the terminal through 2019, after which it will retain priority usage of the gates, check-in and baggage facilities until 2025.
A per-passenger charge will be imposed on Qantas with effect from 1 September.
The terminal services around ten million passengers annually.
"We now have certainty about our future operations in terminal 3 post-2019."
Qantas Group CEO Alan Joyce said: "This deal secures Qantas' long-term position in our largest hub, ensuring priority usage as the primary airline customer of Sydney's terminal 3.
"We now have certainty about our future operations in terminal 3 post-2019, and an outcome that is a win-win for both Qantas and Sydney Airport."
The airways and the airport have also signed a five-year deal over domestic runway charges and international aeronautical charges.
Qantas is planning sale of leases at Melbourne and Perth airports, after selling one at Brisbane airport for $112m in February 2014.
The sale comes a few days after Qantas announced a multi-million dollar refurbishment of its lounges at the Brisbane airport.
A new lounge precinct is planned to be constructed to increase the domestic terminal expansion by 30%, with the redesign of the existing Qantas Club and construction of a new business lounge and chairman's lounge.
The first and business lounges in the international terminal at Brisbane will be redesigned to create a single lounge.