It was a chance meeting next to the palm tree just yards from her bedroom that led to a 14-year-old girl being whipped to death in this tiny village about 40 miles south of the Bangladeshi capital, Dhaka.

In the early evening Hena Akhter had gone out to use the bathroom when she was met by her cousin and neighbour, Mahbub, who gagged her with a cloth before beating her.

The assault left her on the brink of consciousness, unable to walk or talk. But instead of punishing Hena's attacker, local elders called a shalish – a village meeting – where she was accused of having an illicit relationship with a married man.

Mahbub's wife, Shilpi, complained that he had secretly been meeting Hena. Village elders found both cousins guilty.

"I was called to the meeting, in Mahbub's home, and I cried when they said what her punishment was going to be," Hena's father, Darbesh Khan said. "They said she would be given 101 lashes, and Mahbub would get 201."

It was up to Darbesh to take his daughter to receive her punishment last week. He and his wife, Akleema, carried Hena to the verandah of the house where the meeting had been held. Barely able to stand, she was whipped with a cloth twisted into a rope until she fell unconscious.

The following day, Hena – who was named as Mosammet Hena in some local press reports – was taken to hospital. Six days later, she was pronounced dead. "I hardly wish I was alive," Darbesh said. "I didn't think my daughter would die before me. I can't think; my life is ruined."

Last July, the Bangladesh high court ruled that extrajudicial punishments in the name of fatwas – religious edicts under Sharia law – were illegal. Local officials were instructed to take active measures to prevent them.

Sara Hossain, a barrister involved in the high court case, said: "We have no Sharia law in Bangladesh except when it comes to family matters. Elders who find a woman guilty of something which they believe to be a social or immoral offence have no authority to do so."

The death has provoked outrage in the country, with human rights activists demanding justice for Hena and an end to the use of religion to deliver justice. Yesterday, rallies and human chains were formed in support of her.

But seven months after the high court ruling, Hena's case has raised uncomfortable truths over the authorities' ability to prevent abuses. Hena's parents were not even aware her whipping was illegal.

"I'm not educated," Darbesh said. "I don't know what the court laws are. But I know that if I don't listen to the elders, we would be outcast. None of my daughters could marry, no one would even look at us. If I had known that it would be them who would be punished, not me, then I would have tried to stop it."

Makeshift shalish courts, in which village elders and religious clerics hold a trial based on traditional, often religious norms, have been an age-old tradition in rural Bangladesh.

But human rights activists warn that a disturbing development is the use of extreme violence to resolve disputes.

According to villagers, Mahbub was also ordered to marry Shilpi following a shalish 15 years ago. It was claimed that he had raped her, and the only solution left was for them to marry.

At the shalish in Chamta, Hena and her alleged affair were discussed at length by Mahbub's family. Darbesh was not given the opportunity to speak. Hena lay ill in bed throughout, unaware of the sentence being passed on her.

Meanwhile, Shilpi also used the meeting as an opportunity to file legal papers laying claim to Mahbub's land and assets.

"Mahbub was a bad character," Hena's sister, Rehana said. "He had been following Hena on her way to school, trying to get her to go and meet him. But she wasn't interested. Even still, Shilpi got jealous. She was worried he would yet to marry her. That's why she went to the shalish."

Mahbub was sentenced to be lashed by his father. But he escaped after the first few blows, according to Hena's family. His village home – just opposite from Hena's – is now empty. He and his family fled after police became involved.

Shilpi and three others have been arrested on suspicion of murder. Police are hunting another 14 accused of failing to prevent Hena from being killed.

Senior officers in Shariatpur have also been ordered by the high court to explain why they failed to prevent her death.

Hena was buried in her family graveyard on Wednesday. The whole village attended.

"I told the police everything they want to know," Darbesh said. "I want a proper investigation, and I want justice. What happened in Mahbub's home – what sort of justice is this?

"My daughter was just a young girl, and these people said she had to be whipped, and there was nobody stopping them."