The Supreme Court has ruled it's unacceptable to discriminate based on age, even when operating under foreign law.
The ruling comes after two pilots were told they couldn't fly once they reached the age of 55.
David Brown and Glen Sycamore were facing forced retirement, as part of their contracts with Cathay Pacific subsidiary New Zealand Basing.
In 2014, the Employment Court ruled the contracts were discriminatory, but New Zealand Basing appealed the decision in the High Court and won.
The court of appeal ruled their employment contracts were legal, as they were operating under Hong Kong law.
But the pilots' lawyer Garry Pollak says the decision was overturned.
"And the supreme court which of course has the final say said parliament has intended that all discrimination is unlawful in whatever circumstance."
The Supreme Court has now ruled the pilots should be allowed to fly.
Pollak says it's a big victory for his clients.
"Some people do feel that age discrimination is not as serious as say racial or religious discrimination, but if you are the victim of it like these two...you know they're quite upset."
He says it's a huge relief for the two men.
"They remain as employees and they can't be forcibly retired until they reach the age of 65."