A injured young whale washed ashore at Pilot Bay had to be killed after more than five hours of attempts to refloat it.

The juvenile whale was euthanised near the bay's boat ramp at 10pm yesterday. It stranded itself about 5pm.

Mt Cats and Yaks owner Nevan Lancaster said he saw the 3m whale come ashore and with help from Max Tamatea, the pair tried refloating the mammal back to sea but it kept returning to shore.

"It always swam back. It was bleeding. It had to be injured but I'm not sure how," Mr Lancaster said.

Advertisement

Department of Conservation staff attended to the whale but nothing more could be done.

The whale was killed with two gunshots at 10pm.

Iwi representatives also attended and gave a karakia.