The Philippines' highest court has ordered the closure of a 30-year-old dump site near a popular tourist enclave, five months after an avalanche at the massive rubbish heap killed five.

In a four-page ruling obtained by AFP on Sunday, the Supreme Court issued an environmental protection order to stop the Baguio city government from operating the Irisan landfill, citing environmental hazards.

"You … are hereby ordered, effective immediately, and until further orders from this court, to cease and desist from making use of the Irisan dumpsite either as a temporary holding/staging area or as a dumping or controlled area for any and all kinds of solid waste," said the ruling.

The judgment, dated January 17, comes five months after a powerful storm triggered an avalanche at the site, killing five local people.

A petition had been filed by local officials and environmentalists who said continued use of the landfill not only endangered the public, but also contaminated a nearby waterway.

Baguio city, located on the northern island of Luzon, is popular summer getaway, boasting picturesque pine-covered mountains and cool climate.

The court's ruling marks only the second time that the Philippines' top adjudicator has issued a environmental protection order.

In November, it stopped the operations of a 177 kilometre (109 mile) gas pipeline that passed underneath Manila after a leak was discovered, preventing what could have been a major disaster, environmentalists and officials said.