HONG KONG — More than 150 whales became stranded on a Western Australia beach, wildlife officials said Friday, as poor weather and the threat of frenzied sharks prevented rescuers from saving scores of them.

The short-finned pilot whales were spotted Friday morning on the coastline of Hamelin Bay, about 160 miles south of Perth. But by nightfall, all but seven of the whales were dead, according to the state’s Department of Biodiversity, Conservation and Attractions.

“Most of the whales beached themselves on dry land overnight and have not survived,” said Jeremy Chick of the department’s Parks and Wildlife Service, who was overseeing the rescue attempt.