LONDON — Britain’s Court of Appeal issued a landmark ruling on Thursday that stymied plans to build a third runway at Heathrow Airport in London, declaring that the government illegally neglected its commitments to reduce carbon emissions and protect the planet from dangerously high temperatures.

The ruling, among the first in the world to measure a state’s infrastructure plans specifically against its promises under the Paris Agreement on climate change, threw the expansion of Heathrow into doubt and opened up a new frontier for legal challenges to major projects in Britain and around the world.

While the decision left the door open for Britain’s prime minister, Boris Johnson, to reformulate the plans and try again, it set back the runway expansion considerably, prolonging a battle that has raged for years. That posed a dilemma to a country — a “truly global Britain,” in Mr. Johnson’s words — that is in the midst of severing its strong ties to Europe and looking for new trading partners farther afield.

But analysts said the ruling also relieved Mr. Johnson of having to oversee a project that he once opposed — so strongly, he once said, that he would lie down in front of bulldozers to stop it. And it halted one part of the government’s aviation expansion plans at a moment when any additional flights jeopardize Britain’s own legally binding target of net-zero greenhouse gas emissions by 2050.