Angry Sri Lankans killed a police officer in the latest outbreak of violence sparked by a fear of nocturnal prowlers known popularly as "grease devils" that has gripped rural areas in the island nation over the past two weeks.

Another officer and five other people were hurt in two separate incidents in the north-western town of Puttalam after residents gave chase to a suspected grease devil, police and witnesses said.

Traditionally, a grease devil was a thief who wore only underwear and covered his body in grease to make himself hard to grab, but the modern iteration has a far more sinister reputation as a prowling attacker of women.

Five people have died in outbreaks of violence related to the grease devil panic so far, including Sunday's incident.

More than 30 incidents of violence and vigilantism have been reported in eight districts of the country, primarily in areas inhabited by minority Muslim or Tamil people as the government and opposition trade blame over the phenomenon.

"Some people had attacked a policeman on traffic duty in Puttalam town and he died after being admitted to the hospital," police spokesman Prashantha Jayakody said.

Mr Jayakody said that in a separate incident in Puttalam, people assaulted a police constable who went to the village. He declined to say what prompted the attacks.

Residents said people had spotted an unidentified man and given chase, but policemen on duty fired in the air and later toward the crowd.

"At least five people were injured including a 13-year-old child," said an area resident by phone, speaking on condition of anonymity for fear of angering the authorities.

The government has said grease devils are merely criminals taking advantage of traditional beliefs in spirits and devils in Sri Lanka's rural areas, and have vowed to punish those responsible for spreading panic about them.

On Saturday, in the nearby town of Kalpitiya, a government hospital refused treatment to a suspected grease devil who was brought by the navy after area residents attacked him.

Hospital officials were angry at damage caused to the building after residents and navy sailors who kept the man from being lynched got into a fight, local media reported.