MUMBAI — Eleven years ago, Shahid Nadeem witnessed the blasts that rocked the small town of Malegaon, 167 miles from Mumbai.

The experience and its aftermath, which left 37 people dead and more than 100 injured, shook Nadeem, then a young undergraduate, to the core.

In the immediate months that followed the blast, police rounded nine Muslim men and charged them with the crime.

The men were poor and had no lawyers to assist them.

“I saw innocent men taken by the police,” he said. “There was nobody to appear for them.”

The experience inspired Nadeem to become a lawyer.

He now works for the nonprofit Jamiat Ulama e Maharashtra’s legal arm, which sprung up to defend wrongly accused Muslim terrorism suspects.

The Malegaon blast was one of two major bombings in India in 2006 in which Muslim men were arrested or detained, some charged and later tried.

“People started coming to us,” said Gulzar Azmi, the general secretary of the organization’s legal group. “And our cause grew.”

To date, the group has helped acquit more than 100 Muslim men of terror charges.

The group’s funding is entirely drawn from “zakat,” or the donations made by faithful Muslims. Over the years it has acquired a reputation for defending poor, innocent men accused in some of India’s most well-known terror cases.

Along the way it has challenged the applicability and validity of an Organized Crime Act, which conferred wide-ranging powers on investigating agencies.

In April a Mumbai court discharged the nine men who had been originally arrested in the Malegaon case, five years after the investigating agency said it had no evidence against them.

The office of the Jamiat occupies two floors of a crumbling building beside a garbage-choked pond in Dongri, a largely Muslim part of Mumbai.

Azmi is in charge of the Jamiat’s legal group along with Nadeem and Ansar Tamboli, another full-time lawyer.

The group is now dealing with the cases of about 600 men.

Muslims in India constitute about 14 percent of the nation’s 1.2 billion people, making India the country with the second-largest population of Muslims, after Indonesia.

But those Muslims are worse off socio-economically and overrepresented in the criminal justice system.

Young men nabbed on false terror charges has been a recurring problem through the years, often attributed to ingrained biases of the police.

In May, the central government’s law minister acknowledged as much and said reforms were needed to put an end to the practice.

For a while it seemed as if the epidemic of arrests had slowed, but with the rise of the Islamic State group in Syria and Iraq, the trend reversed.

“It is easy for the police to implicate people, especially now,” said Sharif Shaikh, a Mumbai lawyer who has appeared in a slew of terror-related cases and regularly takes on some of the Jamiat’s cases.

He’s seen case after case in which innocent Muslim men claimed to have been tortured and harassed at the hands of the police.

“We have managed to get many acquittals when we were able to apprise the court of the real facts,” he said, “but people’s entire lives have been destroyed, and society doesn’t accept them back.”

Mufti Abdul Qayyum knows only too well what it feels like to return to society after more than a decade in prison on false charges. Arrested in 2002 in a terror case in the state of Gujarat, the religious teacher was acquitted by in 2014.

Last year Qayyum released a book detailing his traumatic years within the criminal justice system.

For such financially strained men from a minority community, the Jamiat has been an invaluable lifeline.

“I had no money,” he said. “Without the Jamiat’s help I wouldn’t have been able to fight.”

The Jamiat has tapped several of the country’s best-known criminal lawyers to argue cases. If, after close scrutiny, the Jamiat takes on a case, they do so for free.

Most are terrorism cases. And while the group is focused on helping innocent Muslim youth, it has also taken on cases for non-Muslim men.

“If there is a poor Hindu, we don’t differentiate,” says Azmi.

Once in 2014, a member of India’s ruling BJP party sought to ban the group, alleging it was operating illegally and supporting terrorists. Another time a dreaded Mumbai gangster threatened the group.

Azmi filed a report with the local police and he now has police protection.

(Bhavya Dore is a Mumbai-based correspondent.)