For four decades the Pakistani lawyer Asma Jahangir, who has died aged 66 after a cardiac arrest, led the way in the struggle for human rights – especially those of women, children and religious minorities. In doing so she deployed a sharp wit and a direct manner of speaking. But while her voice was appreciated by liberals who believed that the only way Pakistan’s civil society could progress was to improve its human rights record, she had powerful detractors who opposed her actions on the grounds that she was destroying the country’s traditional political and social fabric.

In 1983, as part of the Movement for the Restoration of Democracy, Asma, who had recently been called to the supreme high court, was among members of the Lahore Punjab Women Lawyers’ Association who publicly protested against the proposed law of evidence stipulating that the value of a woman’s testimony was half that of a man. Having been teargassed and beaten by the police, several of the protesters were jailed, as was Asma.

Undaunted, she continued to raise the profile of human rights by taking up the cases of the poorest and most helpless people, setting up – with her sister, Hina Jilani – the first centre offering legal aid in Pakistan, the AGHS Legal Aid Cell. In 1987 she co-founded the Human Rights Commission of Pakistan, later becoming its chairperson, a position she held until 2011. Her work gained global recognition for fairness in defending the most underprivileged, as did her outspoken condemnation of Pakistan’s blasphemy laws, leading to death threats against her.

Her attempt in 2005 to hold a mixed gender marathon in Lahore to highlight violence against women resulted in attacks by conservative Islamist groups in which the police were complicit, later confessing that they had been ordered to beat the participants and tear off their clothes.

Born in Lahore, in Punjab province, Asma was the daughter of Malik Ghulam Jilani, a civil servant who upon retirement became a politician, and his wife, Sabiha. She was the daughter of the Urdu literary editor Maulana Salahuddin Ahmed, and one of the few Muslim women at the time to be educated at a co-educational school. Later Sabiha set up a clothing business when the family’s lands were confiscated due to her husband’s political activism.

Asma’s own involvement in politics had its roots in her youth, when her father became a vociferous critic of the military dictatorship in the 1960s, leading to periods of imprisonment and house arrest, against which Asma and Hina protested.

After receiving her BA in law at Kinnaird College, Lahore, and her Bachelor of Laws (LLB) from Punjab University (1978), Asma was called to the Lahore high court (1980). She and her sister, with two other lawyers, then became the first women to establish a law firm for women; they also helped to set up a pressure group, Women’s Action Forum (WAF), which campaigned against discriminatory aspects of Pakistan’s legislation, notably the Hudood Ordinances, passed under the regime of General Mohammad Zia-ul-Haq, whereby women who had been raped had to prove their innocence or else themselves be convicted of adultery.

I first met Asma in 1989 when interviewing her for the BBC World Service to assess the extent to which Benazir Bhutto’s election as prime minister had lifted Pakistan’s glass ceiling. Asma’s answer was unequivocal: yes it had helped, because having a female prime minister meant that, despite continuing gender inequality, she and her colleagues could act with greater certainty that, in so far as was possible, they would be supported at the highest level.

When I was editing a series of essays in celebration of Pakistan’s 50 years of independence from Britain, by authors from both countries, hers was among the contributions. Her chapter was entitled Human Rights Are Women’s Rights, because, as she told me: “You cannot have human rights in a society if you do not have women’s rights.” She also wrote Divine Sanction? The Hudood Ordinances (with her sister, 1990) and Children of a Lesser God: Child Prisoners of Pakistan (1993).

She was president of the Supreme Court Bar Association of Pakistan (2010-12). In 2016 she was appointed UN special rapporteur for human rights in Iran.

We last met when she gave a memorial lecture at Lady Margaret Hall, Oxford, earlier this month to commemorate 10 years since the assassination of Benazir Bhutto; again she emphasised that having a woman as prime minister in a traditionally male environment set an example to all women that they could attain seniority in their respective fields.

Chief among her awards was the Hilal-i-Imtiaz presented in Islamabad in 2010; she was also an officer of the Légion d’honneur (2014) and the recipient of honorary doctorates from universities in Switzerland, Canada and the US.

Asma is survived by her husband, Tahir Jahangir, whom she married in 1974, a son and two daughters, and Hina.

• Asma Jilani Jahangir, lawyer and human rights activist, born 27 January 1952; died 11 February 2018