HONG KONG — Four Westerners who stripped atop Malaysia’s highest peak pleaded guilty on Friday to public obscenity and were due to be deported, their lawyer said.

The four were fined about $1,300 apiece and received three-day jail sentences, which they had already served, said the lawyer, Ronny Cham. They were scheduled to take the first flight Saturday morning out of the city of Kota Kinabalu, he said. They had faced possible jail terms of up to three months.

Their case received international attention after some local officials said that by removing their clothes on Mount Kinabalu, which is considered sacred by many who live near it, the foreigners had helped cause a deadly earthquake last week.

Eleanor Hawkins, a 24-year-old British woman; Dylan Snel, a 23-year-old Dutch man; and Lindsey Peterson, 23, and his sister Danielle Peterson, 22, of Canada were part of a group who split off from a larger party of trekkers on the mountain last month. They removed their clothes and took photos, despite requests from a guide that they not do so.