© Julian Barlow
The whale carcass that has closed Moses Rock Beach to surfers.
Fears a whale carcass will attract sharks close to shore have shut a popular surfing beach near Gracetown.

The Department of Fisheries says Moses Rock Beach could be closed for several days.

Fisherman Julian Barlow spotted the whale on Friday afternoon.

"My father-in-law and I were on our way home from a fishing trip and decided to drive down to Moses Rock Beach for a look - because we had never been there before," Mr Barlow said.

"When we got to the car park we saw this huge whale carcass - just on the reef close to the beach."

He contacted the Departments of Fisheries and Parks and Wildlife and sent them photographs of the carcass.

"We were just worried that there might be people surfing at little beaches nearby who had no idea the carcass was there and that there could be sharks in the area," he said.

Mr Barlow said the Department of Parks and Wildlife staff had identified the dead whale as a humpback calf and estimated it was between five and six metres long.

The department has officially shut Moses Rock Beach and issued an alert for people using other beaches nearby to take care in the water.

"As the site does not allow for the removal or burial of the carcass it is likely that the beach will remain closed for some time," a spokesman said.