Kalief Browder was 16 years old when he was picked up by the police in the Bronx and charged with stealing a backpack, a crime he always denied.
Given the slow-moving nature of the American criminal justice system, Browder, whose family could not afford the US$3,000 bail, spent three years in jail without facing trial. He was housed in one of the jails at Rikers, a 162ha island in the East River between Queens and the Bronx.
He was eventually released without charge, but the horror of his experience - he had suffered extreme violence, endured almost two years in solitary confinement and had tried to commit suicide more than once - saw him emerge a broken man. He killed himself last year, aged 22.
This tale is one of many horror stories that come from Rikers Island, a colossal blight on the landscape of the American penal system. It influenced the writers of The Night Of, the new eight-part series from HBO telling the fictional story of a young Pakistani- American, Naz (played by Riz Ahmed), who is charged with murder and sent to Rikers while awaiting trial.
John Turturro, 59, plays John Stone, the world-weary, low-level lawyer who works on Naz's defence.
He says: "If you don't have money for bail, you can be kept in Rikers for a very long time. Kalief Browder was held for 800 days and he was just 16. He never recovered.
"I reached out and wanted to meet him, but he wasn't ready. I thought he could work with us, but he ended up taking his own life.
"Our show is about what happens to people when they're accused, and what happens to their families and those who represent them and try to convict them. I think it is beautifully delineated in a very dark way."
Naz was an honours student when he went to Rikers, with no criminal record. His time in that violent environment changes him, however. He becomes violent. He gets involved with drug smuggling.
Ahmed, 33, who has starred in other thought-provoking shows such as the 2012 film The Reluctant Fundamentalist, says: "The show is very intelligent and nuanced and it is brutal. The Night Of feels real and it is dark. It is really authentic and uncompromising."
The series is based on a British programme from 2009 called Criminal Justice, which writer- director Steve Zaillian and screenwriter Richard Price relocated to New York and added extra layers.
Much of the show unfolds in Rikers. According to the show's producer, Jane Tranter, Zaillian visited Rikers twice, speaking to many people.
"I only visited once," says Tranter, 53, "and I never, ever want to go back. It is hell. I found the solitary area particularly overwhelming."
Zaillian, 63, concurs, saying: "A lot of the stuff we show in the series is stuff that we heard about and has come out in the press since we shot there."
Browder's story is a case in point.
"A lot of what we heard in Rikers is now a matter of public record," says Zaillian, who won an Academy Award for his adaptation of Schindler's List (1993) and earned nominations for his screenwriting on Awakenings (1990), Gangs Of New York (2002) and Moneyball (2011).
The Night Of also deals with race and New Yorkers' relationship with Asian Muslims in the aftermath of 9/11.
Zaillian, who also directed All The King's Men (2006), and Price recast the primary character from a white man in the British series to a Pakistani-American.
Ahmed, who next appears in the forthcoming Jason Bourne film and has a prominent role in Star Wars: Rogue One at the end of the year, says: "In The Night Of, the story starts when my character borrows his father's taxi and, in New York, many of the taxi drivers are of Pakistani or Indian extraction. That small detail added so much to the story."
The show was first conceived about five years ago and the pilot episode was filmed in 2012 with the late James Gandolfini in the John Stone role.
Zaillian says the actor's death the following year did not hold up the production, although it saddened him.
"The decision to go on was made independently of James' death," Zaillian says.
"It was a decision HBO made that was not, 'Do we want to go on without James?' It was, 'Do we want to go on with the show at all?'"
Gandolfini had filmed only the pilot and his character had appeared briefly. After his death, Robert De Niro was set to take the part, only for scheduling conflicts to scupper that plan.
In stepped Turturro, whose performance is praised by Tranter.
"John's is one of television's most bravura performances in terms of its breadth and depth," says the producer, who concedes that the role is not an easy one to portray.
For one thing, Turturro was instructed to bring some levity to the dark and serious show.
"The humour is very important," says the actor. "I know a lot of homicide detectives whom I worked with on the movie Clockers. They just reeked of black humour. Everything they said was humorous because they were dealing with dead bodies every day.
"So the humour is a coping mechanism. You need that in a show that's this dark."
• The Night Of premieres in Singapore today on HBO (StarHub TV Channel 601) at 9am (same time telecast as the US) and 9pm.