Police have detained four Westerners accused of posing naked to take photos on a Malaysian mountain - an act that has been blamed for causing the earthquake that killed 18 climbers last week.

Police obtained a court order to detain them for four days while they are investigated for indecent behaviour, Sabah state police chief Jalaluddin Abdul Rahman said.

Two Canadian siblings and a Dutch male surrendered at a police station in Sabah on Tuesday evening, he said. A British woman was detained at a Sabah airport earlier Tuesday while trying to fly to Kuala Lumpur.

Malaysia's Foreign Affairs Ministry earlier identified the siblings to as Lindsey Petersen and Danielle Petersen.

They were believed to be part of a group of 10 people who stripped naked before taking photos at Mount Kinabalu on May 30.

A magnitude-5.9 earthquake on Friday sent rocks and boulders raining down the trekking routes on the 4,095m-high mountain, killing 18 climbers.

The victims were nine Singaporeans, six Malaysians and a Filipino, a Chinese and a Japanese national.

The quake damaged roads and buildings in Sabah and broke one of the twin rock formations on the mountain known as the "Donkey's Ears".

Sabah Deputy Chief Minister Joseph Pairin Kitingan has blamed the tragedy on the foreigners for showing "disrespect to the sacred mountain" by posing naked at the peak.

He has said a special ritual will be conducted to "appease the mountain spirit".

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.