The school was set up, paid for, built and run by some of Orangi’s residents, with the help of a local non-governmental organization, called the Orangi Pilot Project.

It typifies the work going on in the slum among the estimated more than one million residents who have used small grants and loans of up to $300 from OPP since 1980, to build their own city with schools, health clinics, sewers and businesses.

According to the United Nations Development Program, more than 60% of Karachi’s residents live in illegal housing areas, many in unplanned slums like Orangi. These settlements are off the grid and often the scene of deadly shootings between rival gangs.

Orangi’s residents are now turning to confront who owns the land they live on and OPP has expanded its work to help residents get rights to land and clean water.

Umar Farooq for The Wall Street Journal

Activists and researchers at the OPP prepared maps documenting the demographics and infrastructure of urban settlements.

But by widening the focus, the NGO says it has drawn the ire of existing power structures in the city and its workers have become the target of the criminal gangs and syndicates that plague Karachi.

In March, OPP’s most senior worker, Parveen Rehman, was shot dead as she left the organization’s office in Orangi. The murder shocked the city; Politically motivated killings are commonplace in Karachi but community development workers like Ms. Rehman are usually spared, according to OPP.

“[We have seen] nothing at this level before,” says Saleem Saleemuddin, who heads the research and training division of the OPP. “Small things to make our work hard sure, but nothing at this level before.”

Ms. Rehman had successfully lobbied on behalf of OPP for the legalization of goths, illegal settlements on the outskirts of Karachi.

Police say the Pakistani Taliban, a movement known as Tehrik-e-Taliban, was behind the killing.

Ashfaq Baloch, the police officer in charge of the area where Rehman’s murder took place, told The Wall Street Journal that they killed the man suspected of the attack in a shootout a day after Ms. Rehman was killed. “Bullets from the gun he carried matched those from [Parveen Rehman's] case,” Mr. Baloch said.

The Tehrike-e-Taliban has issued statements denying any involvement in Ms. Rehman’s killing.

Senior workers at the OPP, who are familiar with Ms. Rehman’s work, believe her killers were likely from criminal groups who want to acquire land in the goths she was helping to legalize.

Ms. Rehman and the organization’s workers had meticulously mapped many of the more than two thousand goths in the city. Mapping Karachi – much of which is entirely unplanned- is the most important service OPP offers.

“The map is like an x-ray,” Mr. Saleemuddin explains, “it shows you where the problem is.”

The OPP’s plans show the government where a settlement’s boundaries are and document the size and continuity of its population. Without this documentation, the government doesn’t recognize a settlement.

OPP helped residents organize themselves into lobbying groups, put together petitions and arrange meetings with officials to obtain the leases for the land. Since 2010 more than 1,000 settlements have received 99-year leases from the government.

But land is scarce in Karachi, and criminal groups are competing with residents to take control of areas that are officially unclaimed, according to OPP.

Once the land is under their control, the criminal groups – known as “land mafia” – push to have it legalized so they can divide it and sell it for profit. The OPP has documented these sales, showing that most of the hundreds of thousands of newly-legalized plots sold in Karachi benefit the land mafia.

Before OPP began mapping Orangi in the 1980s, there were not even any maps showing the layout of the streets.“We map the drainage system, take it to the authorities and say, ‘here is the problem,’” said Mr. Saleemuddin.

Umar Farooq

Work on one of few remaining open drains in Orangi

Mr. Saleemuddin says OPP’s strategy – providing technical help and promoting the financing of projects by residents themselves – has been replicated by NGO’s across Pakistan. Qari Zahoor Ahmad runs the Sahil Development Organization, an NGO that works in rural parts of Punjab near the city of Gujranwala.

With technical guidance from the OPP, Mr. Ahmad says hundreds of homes in several villages now have indoor plumbing, at a fraction of the cost it would have taken the provincial government to complete.

Back at Iqra Real Islamic School in the slum, Hafiz Muhammad Ashraf, the owner, now has enough money from fees of up to $4 a month, to open a second school.

In 2002, after the OPP gave Mr. Ashraf a grant of $250 to make structural improvements, parents began enrolling their children in large numbers in the school.

It is now part of a coalition of schools which pool their money to finance each other’s improvement projects.

“We want the schools to grow and become self-sustaining,” said Salma Mir, who oversees OPP’s education program, which provides grants and loans of $150-$250 to schools with fewer than 300 students. “It’s not a lot,” Ms. Mir said, “but it goes to help people who are already helping [improve Orangi].”

About India Real Time

India Real Time offers analysis and insights into the broad range of developments in business, markets, the economy, politics, culture, sports, and entertainment that take place every single day in the world’s largest democracy. Regular posts from Wall Street Journal and Dow Jones Newswires reporters around the country provide a unique take on the main stories in the news, shed light on what else mattered and why, and give global readers a snapshot of what Indians have been talking about all week. You can contact the editors at indiarealtime(at)wsj(dot)com.