A child bride who spent 19 years in prison for a murder she did not commit is to sue the Pakistan authorities in an effort to persuade the country to help thousands of other victims of miscarriages of justice.

Rani Bibi was just 14 when she was convicted, alongside her father, brother and cousin, of the murder of her husband and spent the next two decades sweeping the floors of an overcrowded Pakistan prison.

Last year a Lahore high court judge acquitted her of all charges, apologetically noting that she “was left to languish in the jail solely due to [the] lacklustre attitude of the jail authorities”. He added that “this court feels helpless in compensating her”.

Bibi is trying to regain her life as best she can. Sitting on a chair in her dilapidated two-room shack on the outskirts of Islamabad, with no financial means, she despairs of her second chance in life. Now 36, she had not reached the legal age of marriage under Pakistani law when she was forcibly married off by her parents. Soon after her husband was murdered, with his body buried alongside the shovel used to kill him. She was jailed along with her father, who died in prison, her brother and cousin, who were both released long before she was. There was no evidence at all to link Bibi to the crime.

“I am [a] victim of the injustice; the entire system is responsible [for] ruining my teenage and youth years in prison without any crime,” she told the Guardian.

Bibi struggles to find work because of her notoriety. She has remarried and lives with her husband and brother. “I was formerly working as domestic help but have not a stable job since then. Although acquitted, I struggle to find employment due to the stigma attached to time spent in prison”.

She was let down on several occasions by the authorities, after being convicted and sentenced to life imprisonment in 2001. The prison superintendent did not follow the legal process, and failed to file her appeal to the high court.

She only found out in 2014 when, by chance, her case was discovered by a lawyer, the late advocate Asma Jahangir , who came across Bibi in prison and pursued an appeal. She was finally acquitted in 2017. However, Pakistan has no system to compensate victims of miscarriages of justice, something Bibi and her supporters now hope to change.

This month saw a petition filed at Lahore’s high court against the Punjab government, urging judges to compensate Bibi and seeking new legislation to act against wrongful convictions.

“This case needs acknowledgement from the judges of the miscarriage of justice,” said Michelle Shahid, a lawyer from the Foundation for Fundamental Rights, a group working for Bibi, who estimates that there are thousands of similar cases in Pakistan. “There is no debate in Pakistan about wrongful convictions of criminal cases and this is the right time to introduce legislation about this issue,” she said.

A 2019 study by the foundation found that of the death sentences reviewed by the Pakistan supreme court, 78% of those decided by lower courts were overturned.

A senior official at Lahore high court told the Guardian, on condition of anonymity, that “wrongful convictions are due to false testimony and judges have no fault on this issue”.

Legal experts believe Bibi’s case is a precedent and can help fix a flawed legal system that wrongfully convicts thousands of people and leaves the innocent without support to rebuild lives after they are eventually acquitted.

“The case of Rani Bibi spending two decades in jail after being wrongly convicted, may seem rather alarming to outside observers, but those who practise law recognise that convictions on the basis of circumstantial evidence or confessions extracted through torture by the investigating agencies are a fairly common occurrence,” a senior Islamabad attorney, Osama Malik, told the Guardian.

He said the judicial system lacks the capacity to cope with the country’s growing population and huge caseloads lead to backlogs. Lower courts rely too heavily on flimsy evidence and dubious confessions, sometimes obtained through torture.

“Pakistan in 2008 became a signatory to the International Covenant on Civil and Political Rights, which guarantees that anyone who suffers from a miscarriage of justice will be compensated. However, this is something that Pakistani courts have been reluctant to enforce for fear that the sheer number of wrongful convictions every year may result in opening of the floodgates with thousands of victims demanding compensation,” Malik said.

For Bibi, her wish is to ensure “that no citizen of Pakistan suffers at the hands of the criminal justice system like I have”.