Britain has spent almost half a century trying to decide whether or where to build a new runway in the densely populated southeast of England. If finally opened, it will be the first full-length runway built in the London area for 70 years.
Prime Minister Theresa May's government has argued that an expansion will show Britain is open for business and able to develop stronger trading ties with Asia after it leaves the European Union - although Brexit has been delayed by a parliamentary deadlock over the terms of departure.
But the expansion plan is still opposed by London Mayor Sadiq Khan, and a lengthy legal wrangle still lies ahead if the campaigners decide to launch another appeal in the next seven days.
The No. 2 man in the opposition Labour party, finance spokesman John McDonnell, described the court ruling as "bizarre" after he attended the hearing in London.
"This is just the first stage in defeating 3rd runway and protecting our environment," McDonnell said on Twitter.
The airport, which is jointly owned by Spain's Ferrovial, the Qatar Investment Authority, China Investment Corporation and other investment companies, is in McDonnell's constituency.
The expansion plan, endorsed by parliament last year, is forecast to cost around 14 billion pounds ($18 billion).
Under the current plan, the third runway is expected to become operational by 2026.
"We are delighted with today’s ruling which is a further demonstration that the debate on Heathrow expansion has been had and won, not only in parliament, but in the courts also," a spokesman for Heathrow said.
Environmental groups say the expansion will damage the quality of air and increase noise levels. They had argued the plan was inconsistent with pledges made as part of the 2015 Paris Agreement on climate change.
Tim Crosland, a director of one of the groups that made the legal challenge and an adviser to the Extinction Rebellion group that protested across London last month, said the court judgment was disappointing but it was increasingly difficult to see how the third runway could actually go ahead.
"Following the recent Extinction Rebellion protests there is widespread recognition that we are in a state of climate and ecological emergency," he said. ($1 = 0.7650 pounds)
(Writing by Kate Holton Editing by Guy Faulconbridge and Mark Heinrich) ((email@example.com; 0044 207 542 8560; Reuters Messaging: firstname.lastname@example.org))