A man died in a hospital eight hours after being taken from his house and beaten by locals on allegations of attempted rape of a child in Khanpur area of Narayanganj city, police said.

The deceased is Abu Hanif, 30, a security guard of Bagerhat's Sarankhola.

Dr Shahadat Hossain, medical officer of the emergency department at Narayanganj 300-Bed Hospital, said the man died while undergoing treatment at about 8:00pm on Monday.

He said Hanif was brought to the hospital in a critical condition around 3:00pm. His family members came to the hospital around 6:00pm.

"He sustained severe injuries in his head and body," the doctor added.

Sadar Model Police Station Officer-in-Charge Mohammad Nashir Ahmad said locals beat up the man after an allegation of attempted rape was raised in the afternoon.

He was dragged from his home and beaten in the Khanpur Jora Tanki area, the OC added.

Hanif's sister, Rabeya, said her brother was in bed around 12:00pm when some youths entered the house, beat him and took him away.

"They did not listen to our objections and did not say why they were beating him. Later, they said he had tried to assault a child. But, we don't know anything about it," she said.

Her husband, Md Ibrahim, said, "They threatened my wife and forced me out of the house. They took me to the Wasa office in Khanpur, where I saw Hanif sitting inside surrounded by 10-12 men. I recognised one of them who is a neighbour. Later, they put Hanif in an auto-rickshaw and took him away. Much later, we found him at the hospital," Ibrahim said.

Hanif lived in a rented room in Khanpur. Relatives said his wife and three children had gone to their village home a few days ago.

At the hospital, Hanif's weeping father Abul Kalam said: "If my son had committed a crime, legal action should have been taken. But why did they have to kill him? I want justice for his murder."

OC Mohammad Nashir said police have launched an investigation into the incident.

"No complaint about an attempted rape was filed with our station earlier. Police received the body at the hospital. It is not yet confirmed whether an attempted rape actually took place. Police are working on the case," he said.