A shipyard worker has died in Malaysia after his scarf became trapped in machinery.

Angkam Engkang, 44, was painting a vessel's hull when the tragic accident occurred in the Rantau Panjang Shipbuilding zone on Tuesday.

Sibu police assistant commissioner Stanley Jonathan Ringgit told The Star newspaper that the Kapit resident died when the end of the neck scarf became tangled in a brush grinder.