Two dozen pilot whales have died after beaching themselves on Mexico's Baja California Peninsula despite efforts to move them into deeper waters.

Mexico's Navy said in a statement Sunday that its personnel worked along with soldiers, agents of the environmental ministry and local fishermen trying to save the whales on the western shore of the Gulf of California.

It says that only three of the 27 that came ashore were saved. Some returned to the beach after being led into deeper waters.

Photographs distributed by the Navy show a tight cluster of the black whales flopped in shallow water with rescuers trying to push them into deeper water. The statement speculates that the mammals were disoriented and says no signs of injuries were noted.