Curious onlookers hoping to get a look at a dead whale on Mahia Beach are being asked to keep their distance.

The 18-metre sperm whale washed up late last night, and died in the early hours of this morning.

Department of Conservation (DOC) biodiversity ranger Jamie Quirk said the old whale had died of natural causes.

Mr Quirk said about 100 people were on the beach this morning to see the whale.

Our last day at #mahia was sad with beaching of a huge #whale pic.twitter.com/6zZhQ7Yb9m — Louise Upston (@LouiseUpston) December 29, 2017

He said while DOC would prefer people to stay away, anyone who wanted to have a look needed to be careful, and use common sense and dignity.

The whale's carcass would be brought further up onto the beach, and it's jawbone and teeth removed and given to local iwi.

The rest of it would then be buried under sand dunes on the beach, which would be a "tricky job".

"We'll be looking to get rather large diggers here to move it ... this is the busiest time in Mahia so there's a lot of people here, so there's a whole lot of things we've got to do, a bit of crowd control, make sure it's moved safely."

Mr Quirk said the wind and the swell would have brought the whale into the bay.

He said the beach was quite a common whale stranding area, and the Mahia Peninsula acted like the barb in a really large hook that was Hawke's Bay.

Mr Quirk said sperm whales like the one washed up last night were seen on the beach about every four or five years.