Two Delhi police officers drive along a dark highway to the home of an accused rapist, reflecting on the increasingly sadistic violence they are seeing in the Indian capital. “It’s simple,” one tells the other. “The bigger the gap between the rich and poor, the more the crimes.”

Delhi Crime, a Netflix miniseries debuting globally on Friday, reconstructs the police investigation into the notorious 2012 gang rape and murder of Jyoti Singh. The student’s killing triggered protests across India, reform of the country’s sexual assault laws and an ongoing reckoning about women’s safety in the country.

The appropriately moody drama dwells on the role that India’s widening inequality could have played in Singh’s murder and crimes like it, though that isn’t the only culprit identified over seven hour-long episodes.

In the same scene in the car, one of the officers describes an India “exploding” with poorly educated young men fighting over a small pool of jobs, with ideas about sex and women drawn either from patriarchal custom or pornography. “If they don’t get it, they take it, with no regard for the consequences,” he says. “After all, they have nothing to lose.”

Despite the dark subject matter, the director Richie Mehta says he set out to tell a positive story. “It’s not about the illustration of evil,” the Canadian-Indian says. “It’s about the aftermath and the people who deal with it.”

A still from the new Netflix series Delhi Crime Photograph: Netflix

The series emerged from six years Mehta spent reading case material and interviewing the authorities involved in the investigation. Delhi’s underfunded, undertrained and endemically corrupt police force were a particular target of the protests that swelled after Singh’s murder.

“[But] as they talked me through their experiences I started to see the limitations they faced,” Mehta says. “Like that they don’t get to see their families for weeks at a time during an investigation, or that an officer [involved in the Singh case] didn’t even have a vehicle to get to the crime scene.”

The depiction of the investigation is warts-and-all: suspects are frequently beaten; officers keep trying to bunk work to go home or to the gym; lights flicker and then go out when a station can’t afford to pay its fuel bill. Yet a core group of officers doggedly work to catch the six perpetrators, four of whom are still on death row (one ended their own life in prison in 2013 and another, a juvenile, was released in 2015).

The drama is a blend of fact and fiction. The deputy police commissioner, Vartika Chaturvedi, who oversees the investigation, is based on a real official. Officers really did wade across a river to find a suspect – and persuaded him to cooperate by threatening to report his crimes to his mother.

Chaturvedi’s daughter, a restive teenager eager to leave Delhi for Toronto, is a composite of several people, and serves as a stand-in for wealthier young Indians wrestling with the question of whether to stay and help improve their city or decamp to the US, Australia or Europe.

“I can’t walk down the street without getting harassed, I can’t take the metro without men staring at me, and every college that I apply to has 50,000 applications – and it’s only getting worse,” the teenager tells her mother in the first episode.

“No, it’s getting better,” she replies. “You just can’t see it.”

More than five years later, the crime against Singh is still a raw issue. India’s Daughter, a powerful BBC documentary on the subject that included interviews with the rapists, was banned from being screened in the country in 2015. Mehta says he received the blessing of Singh’s parents to make the series, which he hopes will challenge the reputation Delhi has as one of the most dangerous cities for women in the world.

“I hope people see the complexity in the situation,” he says. “It’s very easy for people outside of this place to look at it and say: ‘Oh my god, it’s unsafe, I would never go there.’

“But any police officer will tell you, there up to 22 million people in this city and 80,000 police officers on the streets. Statistically, they can’t stop crime from being committed. People are policing themselves,” he says.

“People are good and there are good officers, trying to do the right thing.”