Qantas has sold back its lease on Sydney Airport's Terminal 3 four years early for $535 million.

The deal also gives the airline priority access to the terminal’s facilities for the next decade, with exclusive use up to 2019.  Qantas bought a 30-year lease on the terminal in 1989, and control of the facility was due to revert back to Sydney Airport at the end of that period.

Chief executive Alan Joyce said the airline’s operations at Sydney Airport had faced an uncertain future after that date, including possibly being shifted to Terminal 2, which currently houses rival Virgin Australia, Qantas subsidiary Jetstar and a number of smaller regional operators.

The deal means that won’t happen and while it may need to share Terminal 3 after 2019, it will have priority use of its key infrastructure for another six years.

“This deal provides certainty,” he said. “The lease was always going to revert after mid-2019. This deal gives us that certainty for our passengers and employees beyond that date and through to 2025,” he said.

Qantas will receive $535 million in cash as part of the sale of the lease and book a $210 million profit on the deal in its 2015/16 financial results.

In exchange, Sydney Airport will receive per-passenger payments from Qantas for flights arriving at the terminal and will also take control of T3’s retail space.

Qantas is also in talks about the sale of its leases at Melbourne and Perth airports.

By Evan Schwarten