Municipal court in the US works like this: the accused stands with his attorney in front of the bench, looking up at the judge on high. The accused is effectively invisible, a bystander to the back-and-forth between judge, prosecutor and defence attorney, who speak in jargon that ordinary people do not understand. The judge may wish the accused good morning when he is first brought in, but he will not be addressed again until the end, when the judge announces his decision and what happens next. Do you understand? Yes, the accused says, although he might well not. Do you agree? Yes.

“If you’re lost in a big-city court, you’ll stand there until you’re kicked out at the end of the day by the security guard,” said Kevin S Burke, a Minneapolis judge and a leading critic of the humiliations inflicted by the US court system. “Even Walmart has a greeter.”

In the courtroom known as Part Two, on the second floor of the Newark Municipal Courthouse in New Jersey, things are done differently. It looks like a typical municipal court – shabby and industrial, with fluorescent lights and linoleum tile floors. Old tables and desks are strewn with manila folders, stacks of paper and rubber stamps. Each day, dozens of people sit on long wooden benches at the back of the room. Almost all are defendants awaiting their time before the judge. Almost all are sitting alone. There are a few women and a few white people, but most are young and middle-aged men of colour.

Some have been jailed and released dozens of times – a life sentence served in 30-day instalments

Newark is a city of 250,000 people, across the Hudson River from New York City. It is marked by high rates of poverty and crime. Victoria F Pratt, chief judge of the Newark Municipal Court, who presides over Part Two, estimates that 85-90% of her defendants have substance abuse problems, and more than 40% have mental health issues. Many have both. These are the people who sleep in the train station, buy small bags of weed or wraps of heroin, or commit petty burglaries. Some have been jailed and released dozens of times – a life sentence served in 30-day instalments. Pratt recently saw one woman with 101 previous arrests.

Part Two is a pioneer of procedural justice, an idea that in recent months has become central to the debate about reforming the US criminal justice system. The idea behind procedural justice is that people are far more likely to obey the law if the justice system does not humiliate them, but treats them fairly and with respect. That begins with the way judges speak to defendants.

On a hot morning in May, Terence Cawley, an African American man in his 20s, sat on a bench at Part Two waiting to see Judge Pratt. He had an earring and a chinstrap beard, and wore grey sweatpants, a tan jacket and blue sneakers. (His name and some details have been changed to preserve anonymity.)

“Good morning Mr Cawley. What’s going on with you today?” Pratt asked. Eleven days earlier, she had sentenced him to 30 days in jail. But as with almost every case in her court, she suspended the sentence, pending completion of a “mandate”, which, in Cawley’s case, meant two days of community service and four days of counselling and support groups. If Cawley completed that, no jail. As she often does, Pratt also gave Cawley an extra assignment: he had to write an essay answering the question “Where do I see myself in five years?”

Now Cawley was back, clutching a handwritten yellow sheet of paper, to read his essay to the court.

“Where do I see myself in five years?” He paused. “I will be part of a rap group, but I also have a talent for cutting hair. I aspire to be a well-known and successful artist. I can also see myself opening my own barbershop. Education could play a major role, to learn the ins and outs of the music and barber industries. Music is more than beats. I do see positivity and success.”

“What’s the name of your rap group, Mr. Cawley?” asked Pratt, impressed.

“Mula,” he said.

“Mula?”

“Like money. Moolah,” he explained.

She quizzed him. How many are in the group? Where do you perform? Do you have a video?

“We have one of a song called Cha-Ching,” he said.

“Is that something I can listen to?”

He shook his head, smiling. “You might not want to listen to it, Judge.”

“Well, I didn’t know I had an artist in the courtroom,” she said. “Mr Cawley, you think and write like a college student. There is every reason you should be in school, so sign up.”

She turned to Janet Idrogo, the resource coordinator from Newark Community Solutions, the organisation one floor above that handles the mandates. “How did he do?” Pratt asked.

“Completed,” Idrogo announced.

Pratt applauded. The court staff clapped with her, along with a few of the waiting defendants.

“So Mr Cawley, what did you learn about yourself?”

“I need to cut the nonsense.”

“That’s right,” said the judge. “Goodbye and good luck.”

“Thank you, your honour,” he called out, waving a hand above his head, and he was out the door.

Victoria Pratt, 42, grew up in the suburbs of Newark, the daughter of an African American father and a mother who emigrated from the Dominican Republic. Her mother, Elsie, was a hairdresser, who eventually ran her own beauty salon, the Curly Comb, in downtown Newark. As a child, Pratt spent her weekends there, taking rollers out of clients’ hair and running to the beauty supply store a few blocks away for hair dye and perm kits.

After college at Rutgers, New Jersey’s state university, Pratt applied to law school, unsuccessfully. She spent a year teaching jazz and African dance to children in a Hispanic community centre and teaching English as a second language. A year later, she got into Rutgers School of Law in Newark. She graduated in 1998, then worked in various state offices and as counsel to the president of the Newark Municipal Council, Mildred C Crump. Pratt provided legal advice, researched legislation and analysed budgets.

One day in 2006, Crump put a fat blue notebook on Pratt’s desk. “Tell me what you think. The mayor is interested,” she said. Inside was a report about the Community Justice Center in Red Hook, a neighbourhood of Brooklyn that Life magazine once dubbed “the crack capital of America”. (It is still a rough area; the lack of a subway stop has kept it from gentrifying at the frantic pace seen in the rest of north Brooklyn.) In 2000, a non-profit organisation called the Center for Court Innovation had established a community court in Red Hook, in a building that once housed a Catholic school. Court Innovation works with jurisdictions to set up new models of courts, tweaks them until they work, and then encourages others to adopt them.

The Red Hook court and its judge, Alex Calabrese, dealt with civil, housing and criminal cases – everything except the most serious crimes. The approach, however, was different from that of a traditional court. Instead of jail, most defendants got rapid sanctions aimed at stopping the cycle of people going in and out of jail: community service, social services such as anger management and conflict resolution, or longer-term drug treatment. (Anyone in the neighbourhood, not just criminals, could get these services.)

The municipal court in Newark, New Jersey. Photograph: Michael Appleton for the Guardian

Compliance was monitored with regular urine tests, and it was obligatory for defendants to come back to court often, to discuss their progress. If they completed the mandate, they stayed out of jail. If they skipped appointments or flunked a drug test, however, they could be given jail sentences that were much longer than the initial sentences they would have received in other courts.

As Pratt read the report on Red Hook, she felt a growing excitement. “Newark really needs this,” she reported to Crump. A few months later, Pratt went to Red Hook to see the court in action. It wasn’t just what Judge Calabrese did that was different – it was how. Calabrese, a big man whose instinctive mode of interaction is a verbal bear hug, sat at eye level with defendants. He congratulated them on each victory, no matter how small. He explained things clearly, in plain language. He asked defendants to tell the court how they had ended up there. He quizzed them on their plans for the future. Over the years, Calabrese became famous in Red Hook as the judge who actually went into the public housing buildings when handling housing matters. He asked defendants: what do you think is best for you? “I had never seen anything like that,” Pratt said.

Calabrese was using what have become the four principles of procedural justice: first, that people who come before a judge trust that the process is impartial; second, that they are treated with respect; third, that they understand what is going on and what they are expected to do; fourth, that they have a voice. Defendants find the procedure fairer when they are allowed to state their views. Experimental evidence shows that this is true even when they are allowed to speak only after the judge has announced their decision. No one likes to lose a court case. But people accept losing more willingly if they believe the procedures used to handle their case are fair.

The concept of procedural justice was first formulated by a social psychologist named Tom R Tyler. Entering Columbia University in 1969, Tyler started college at a moment when respect for the law was at a low point. Racial segregation had been outlawed in the US only five years earlier, but was still defiantly enforced in many parts of the south. The US was fighting a war in Vietnam that was widely considered immoral and illegal. “My entire generation was preoccupied with the question of why we would or wouldn’t obey laws, and whether the law was legitimate,” he said.

The question continued to preoccupy Tyler throughout his time in college. Unlike other researchers in his field, what interested him was not why people break the law, but why they do not. Even criminals, he noted, follow the law most of the time. In his 1990 book Why People Obey the Law, Tyler came up with a novel explanation.

Criminal justice systems everywhere run on the assumption that people obey the law because they are afraid of punishment. B Tyler argued that the key factor is legitimacy: people obey the law because they believe the state has the right to tell them what to do. Broad legitimacy matters more than whether people believe an individual law to be right or wrong – although the public’s view about individual laws can influence broad legitimacy.

In the courts, Tyler argued, legitimacy is created by the perception of fairness. But while lawyers and judges tend to assume that fairness refers to the outcome of a case, that is generally not what matters most to the people who come before a court. For example, Tyler and a colleague asked defendants to describe the process and the outcome of their cases, and whether they willingly accepted the court’s decision. Through statistical analysis, the researchers found that defendants were far more likely to willingly accept the court’s decision if they felt they had been treated fairly. Indeed, this was much more important to defendants in this regard than a favourable outcome.

In other words, an offender is more likely to do what the authorities tell him and refrain from committing further crimes if he feels that he is treated with respect and fairness – regardless of the judge’s ruling. “This discovery has been called ‘counterintuitive’ and even ‘wrongheaded,’” stated a paper published in 2007 by the American Judges Association, “but researcher after researcher has demonstrated that this phenomenon exists”.

Tyler refined the concept of procedural justice in studies conducted over a long career at Berkeley, New York University and Yale, where he is now a professor in the law school. For the first two decades after the publication of his book, Tyler’s ideas were the basis of a largely academic discussion, although over the last five years procedural justice has gradually been taking hold among leaders in the US courts and police.

In the last few months, however, procedural justice has moved near the top of the criminal justice reform agenda. The catalyst was the shooting of an unarmed black man, Michael Brown, in Ferguson, Missouri in August 2014, and the subsequent decision of a grand jury not to indict the officer who shot him. Brown’s death came after Eric Garner, who had suffocated in New York City a month earlier. It was followed by those of Walter Scott, who was shot eight times in the back in South Carolina; and Freddie Gray, who died of spinal injuries in Baltimore. Those are the widely known victims; there are others, including Tamir Rice, a 12-year-old boy shot in Cleveland when police mistook his toy gun for the real thing.

Police abuses and judicial inequity are not new, of course. What is new is mainstream awareness of the system’s deficiencies. (One reason for this is the rise of smartphones – videographers are now everywhere.) White America now knows what black America already knew: the crime-control strategies of the last few decades have degenerated in many cities into deterrence based on fear and intimidation. There are mass arrests of young men of colour for simply hanging around, courts that harass the poor and hand down long and racially discriminatory sentences for relatively minor offences, and prisons that are seemingly designed to break and alienate inmates.

Although most victims of violent crime are themselves poor people of colour, many people in these communities have come to see the criminal justice system as oppressor, not protector. And that has an enormous cost.

Research on procedural justice shows that it can repair relationships between the criminal justice system and the community and, in doing so, reduce crime. After Ferguson, the Obama administration established a task force on 21st-century policing. In May it issued its final recommendations. First on the list was this: “Law enforcement agencies should adopt procedural justice as the guiding principle for internal and external policies and practices.” Tyler’s ideas are at the heart of the national debate.

Victoria Pratt’s visit to Red Hook in 2007 was the beginning of what became a several-year process to adapt its court model for Newark. In November 2009, Mayor Cory Booker (now senator) appointed Pratt to the Municipal Court bench, where she joined 10 other judges. After eight months in traffic court, Pratt learned that she was being assigned to Part Two. At first, it seemed like a punishment: Part Two had the largest volume, the hardest cases and the highest frustration level, as the same defendants came back time after time. But Newark had an ambitious plan for Part Two. It was, chief judge Richard Nunes told Pratt, where Newark was going to put its own version of Red Hook – and she was to become the city’s Alex Calabrese.

Court Innovation, the non-profit that helped set up the Red Hook court, had been working for several years to set up Newark Community Solutions, the agency that would provide alternatives to jail similar to those in Red Hook: psychological screening, counselling, therapy groups and so on. But when Pratt moved into Part Two in May 2010, nothing was in place. There were no services. What she could do on her own was turn to procedural justice. She could talk to defendants the way Calabrese did.

Just a few days after she took over Part Two, a man about her father’s age came into the court on heroin charges. Pratt asked him how long he had been addicted. When he told her he had been addicted for 30 years, Pratt veered into the kind of personal territory that judges do not usually explore. “I wanted to get to the human side and not just the old, dried-up, drug-addict side,” she said, recalling the exchange. She asked him if he had a family. He had one son, who was 32.

“Then you haven’t been a father to your son for most of his life,” Pratt said.

The man started to cry. Ordinarily, Pratt would have jailed him. He had unpaid fines, warrants for his arrest, and had been skipping out on court appearances. But she took a chance on releasing him, telling him to come back in two weeks. Pratt asked Kelly Mulligan-Brown, a resource coordinator for Newark Community Solutions, to find a treatment programme for him.

Pratt did not know if the man would show up, but two weeks later, there he was. “You showed me more love than I have for myself,” she recalled him saying. “So I came back, to get some help.” Pratt was startled. “I didn’t use the word ‘love’. I just talked to him about his son,” she said. “I thought, ‘I could do this all day.’”

Now she does. In court, Pratt’s demeanour is that of a no-nonsense mother who happens to host a high-speed chat show. She switches back and forth between English and Spanish. She comments on a new hair colour, asks about family members. “This court is going to treat you with dignity and respect, and we expect you to treat us the same way,” she tells defendants. “If you show up late or don’t show up at all, you will serve a jail sentence.”

Pratt applauds at every possible opportunity: if someone completes his mandate, clears a debt, sends off a school application, or just pays for a bus ride instead of jumping the turnstile, she gets the room to clap. When I was there, one man got four rounds of applause. She sentenced one lethargic young man to do 25 pushups and film it on his phone.

‘This court is going to treat you with dignity and respect, and we expect you to treat us the same way.’ Judge Pratt affects a no-nonsense demeanour with defendants. Photograph: Michael Appleton

One of Pratt’s favourite moves is to assign essays, an idea she picked up from Calabrese in Red Hook, as a way to make defendants think. But where Calabrese simply read the essays himself, Pratt asks the writers to read them out loud. It is partly practical – bad handwriting – but Pratt believes that knowing that they have to read the essay out loud makes defendants take the exercise more seriously. “Those things she has me talk about I never thought I would go into,” said Tamuir Battle, who has been in Part Two repeatedly for nonpayment of traffic fines. “For me to sit down and write about that – it kind of hits you. Five years from now I’ll be 33 years old. It made me think about what I would like to be. You sit there and get into something, and it turns into three pages.”

“A lot of people say they don’t like her – she’s mean,” said Battle. “They say she’s always going off on people. But I sit in her courtroom from nine in the morning till one, and everything always goes good with Judge Pratt, until someone plays on her intelligence like she’s dumb. That’s when you see the side of her you don’t want to see.”

Come in high, display attitude or miss an appointment, and that side comes out. One day in April, Pratt saw a defendant who had missed a court date because, she said, she did not have the bus fare. “Don’t tell me about the bus,” Pratt told her sharply. “You walk. My father used to walk me from East Orange to Newark and back again.”

“I’ve seen many defendants who, after having talked to the judge, feel there’s some personal connection,” said Ashlie C Gibbons, Part Two’s longtime public defender. (Because of the volume of cases, Part Two has its own public defender, who represents people who want an attorney and do not have their own.) According to Gibbons, sometimes when defendants receive a piece of good news or have achieved something, “they want to go in and tell the judge. They don’t want me to say it. It’s: ‘No, I want to tell the judge myself.’”

Does procedural justice get better results than the practices employed in traditional courts? Court Innovation is just beginning the first formal evaluation of Part Two, but Mulligan-Brown, who now heads Newark Community Solutions, said that an average of 70% of defendants complete their mandates and avoid jail – a very high level of compliance with court orders. Another important marker is the drastic reduction in arrest warrants that the judge issues for no-shows. Pratt said that in traditional court she would sometimes have to issue dozens of warrants per day. Now she is down to three or four per day.

An element of selection bias may be at work. As Part Two requires a guilty plea, defendants have to choose to go there. Those who do tend to be the ones who are ready for it. “If your life is not really governed very well, or frayed at the edges, you’ll probably not do well in the programme,” said Gibbons.

But there is no selection bias in Red Hook, as defendants don’t choose whether to go there or not – and there is strong evidence of success. Two years ago, the National Center for State Courts, which is funded by the US Department of Justice, published a major multi-year study of Red Hook. It found that Red Hook saved money – nearly twice as much as it cost to build and run. The main reasons were lower use of pre-trial detention (which averages $19,000 per case in New York City) and lower recidivism – less crime means fewer victims and less public money spent on jail time. Recidivism in Red Hook was 10% lower than in traditional courts; for juvenile defendants, 20% lower. And in Red Hook’s three police precincts, crime rates dropped steadily. This did not happen in surrounding precincts.

The recidivism findings in Red Hook were a surprise, as the counselling and community-service sentences last only a few days. “These are not the kinds of interventions that the [academic] literature suggests are going to be life-transforming for defendants,” said Greg Berman, the director of Court Innovation. If these brief interventions were not responsible for the lower recidivism rate, what was?

The study found that what mattered most was the attitude of the judge. “Offenders frequently singled out the judge at the Justice Center for praise, describing his compassion, fairness and willingness in his decisions to mitigate the unfair and disrespectful treatment that offenders routinely believed they had received from local law enforcement at the earlier arrest stage of case processing,” the researchers wrote.

(Of courts that practise procedural justice, the most comprehensive evidence comes from Red Hook. There are a few other studies of single programmes, which were mostly successful, although one study, in Milwaukee, found that its efforts to communicate better with defendants had no effect on defendants’ attitudes towards the court, their compliance with court orders or recidivism.)

Newark, a city of a quarter-million people across the Hudson River from New York City. Photograph: Michael Appleton for the Guardian

The National Center for State Courts study contained another unexpected finding. It showed that although Red Hook sent many fewer people to jail than traditional courts, those who were imprisoned served longer sentences – long enough that Red Hook racked up more jail time on average than traditional courts. That is surprising, but Adam Mansky, Court Innovation’s director of operations, argues that this is how jail should be used: “Those cases often involve the most serious charges or prior history and risk of reoffending.”

Hundreds of judicial officials and politicians from all over the world have visited Red Hook – and they are starting to come to Pratt’s court in Newark. When Tom Tyler first published Why People Obey the Law, it was a howl into the wind. In 1990, America’s high crime rates were the major political issue of the day, and any stance on crime other than the hardest possible line was political suicide. No one back then could have imagined that rates of violent crime would now be half what they were in 1991.

We do not fully understand why crime rates have dropped – theories include larger police forces, smarter targeting of police resources, shifting demographics, the end of the crack wave, and even the phasing out of leaded petrol, as lead is thought to increase aggression. (Or possibly, crime is just cyclical; beware the rooster who takes credit for the sunrise.) But in recent years, the debate over criminal justice in the US has moved away from crime-control strategies towards how to mitigate the toxic effects of these strategies themselves. Mass arrests and overwhelming-force policing have turned poor, inner-city neighbourhoods into places where prison is expected, a rite of passage. This leads to a vicious circle, creating generation after generation of fatherless children.

On a practical level, these policies also leech legitimacy from the criminal justice system and keep the system from catching and convicting offenders. “Treating entire communities as if they’re felonious drives this kind of anger,” said David Kennedy, director of the National Network for Safe Communities and a professor at John Jay College of Criminal Justice in New York. “Compliance with investigations is going down. People reporting serious crimes are going down. Juries won’t convict. Clearance rates for homicides are going down. Clearance rates for non-fatal shootings are down to close to nothing.”

Kennedy argues that African American anger at the police is a stand-in for anger at the state, “a permanently sundered relationship with authority”. Courts, too, have lost legitimacy. You do not have to be a person of colour to find courts intimidating and confusing. But if you are, you might be more likely to see them as unjust – black people, for example, are 12% of drug users, but make up 60% of people in state prisons for drug offences.

If we’re going to make the criminal justice system better, it won't be by sending more and more people to jail

“These high-profile incidents [of unarmed black men who have been shot] have made procedural justice really, really, salient right now,” said Tracey Meares, a professor of law at Yale and a leading researcher and proponent of the idea. “If we’re going to make the criminal justice system better, we’re not going to make it better by improving the likelihood that more and more people are sent to prison, or by helping police to arrest more and more people.”

The left and right in the US agree on very little these days. An exception is criminal justice reform. Over the last decade, Charles Koch, one of the rightwing libertarian Koch brothers, has given at least $1m for the training of lawyers for indigent defendants. That is a tiny amount compared to the $900m the brothers say they will splash out to support Republicans in 2016, but it is an indication of their interest in criminal justice reform. And they are not alone: a reform manifesto from the influential organisation Right on Crime has been signed by Jeb Bush, Rick Perry, Newt Gingrich and a number of leaders of the religious right.

It should not be difficult to convince judges to use procedural justice. It is a reform that costs virtually nothing. It is something every jurisdiction, or even individual judge, can do right now. Judges care about ensuring that defendants do what they tell them to do and show up in court, which procedural justice does well. This also saves money, as no-shows cause trial postponements and police must spend time looking for the truants. (This is also a huge problem beyond the US. In 2013, according to the Centre for Justice Innovation, Court Innovation’s British sister organisation, in England and Wales more than 4,500 trial sessions in magistrate’s courts, and 2,000 in crown courts, were cancelled because witnesses or defendants failed to show up.)

Except in special instances such as drug courts, procedural justice is not widespread in the US. Some states – including California, Alaska, Utah, Colorado and Delaware – have taken it on statewide, with varying degrees of commitment, intensity and effectiveness. The largest programme, in California, fell victim to budget cuts after the recession of 2008.

Why is it not more widespread? Intellectually, the idea has no real opponents. “It’s a big judicial world, so maybe some argue that it’s bad policy, but I have never heard or read about them,” said Burke, the Minneapolis judge. Mainly, the judges who object to procedural justice say that it is impractical, requires a special personality type to do well, or argue that the concept is fuzzy and indistinguishable from simple good judging.

Burke read Tyler’s work in the mid-1990s, and ran successfully for chief judge of Hennepin County, Minnesota, on a procedural justice platform. To help judges adopt it, he videotaped them in their courtrooms. He hired a local professor of communications to sit in court and observe. He brought in experts to train judges to become better listeners.

For a while, Hennepin County was the vanguard of procedural justice in the US. But, owing to term limits, Burke stepped down as chief judge in 2004, and many of the judges he trained have since left the bench. “Other priorities came up,” he said. While procedural justice is still used in many courtrooms, Hennepin is no longer a national model.

Burke has taken his message elsewhere, travelling to 39 states to train judges and speak at meetings. He was also co-author of the American Judges Association’s paper on procedural justice. The most common objection that he hears is lack of time. Budget cuts have forced judges to move faster and faster, and their efficiency is clocked. Talking to defendants may save time in the long run if it gets them to comply with court orders, but judges are measured by how many cases they get through today.

Changing a culture that has been embedded for centuries takes more than training. “Under the press of business and time constraints, it’s easy to revert back to previous ways of doing things,” said Rottman. Courts that are serious about procedural justice need to build in systems to keep it going.

That, however, requires a shift in thinking. Tyler also speaks to groups of judges around the country. “I hear a lot of, ‘It’s not my job,’” he said. Judges and lawyers are trained to value outcome, not process. Pratt faced similar obstacles in Newark – other judges were sceptical. “I heard a lot of, ‘You’re supposed to be a judge, not a social worker,’” she said. Some people who started working in Part Two did not like its methods. Others did not want the heavier workload – defendants are easier to deal with if they plead guilty, pay a fine and go home.

It took time, but Pratt found people who got it. Police officer Miguel Carrillo, Pratt’s security officer, had worked on Newark’s gang and narcotics squads. He used to chase down and lock up people on drug charges. Now he finds himself applauding some of those same people.

From left: public defender Ashlie Gibbons, Judge Victoria Pratt and Newark city prosecutor Herbert Washington. Photograph: Michael Appleton for the Guardian

Gibbons was there from the outset, as was Herbert Washington, the court’s dapper, soft-spoken prosecutor. (The original three are an artistic group: Pratt is a dancer, Gibbons was a professional opera singer, and Washington writes music.) Gibbons always approved of Part Two’s methods – most public defenders would. It was more difficult for Washington. “Some of my colleagues don’t think that what we’re doing is real prosecutorial work,” Washington said. “But I am comfortable. Justice is not the same as help. Justice means giving the appropriate punishment for the crime. The prosecutor in Part Two has to have a different mindset: it’s looking for a way to help the person up out of the situation.”

The hardest part for Washington was applauding. “At first I wouldn’t,” he said. “This is a criminal. Let’s just be clear. This isn’t somebody graduating from college. But I think I got used to it because it seems to help. The defendants probably don’t get much of what this judge is giving them from anyone. The person has to say, ‘Wow, maybe I’m not who I thought I was.’”

“We’ll get a card or note: ‘Judge, I’m doing good.’ They were touched by something we’re doing as a courtroom, something Judge Pratt said,” Gibbons said. “If you want to say that’s not the function of the courtroom, you have that right. I believe it is.”

In May, a man came before Judge Pratt in April on heroin charges. He was in his 50s, but looked older, stooped and defeated.

“Do you have a home? Where are you staying?” Pratt asked.

He told her that he was sleeping in the train station.

“What did you do before you started using?”

“I was a tax professional.”

Pratt looked startled. “A tax professional? People who come in here need help with their taxes! What happened?”

The drug habit, he said, started after his son died of a grand mal seizure.

“Do you have another son?”

“One more.”

“And you haven’t been able to be there for him.”

“That’s true.”

“What kind of boy was he?”

“I had two great sons, very energetic and caring.”

He started to cry. Carrillo brought him a tissue.

“Let’s talk about how to get you to the next level,” said Pratt. “Even how you hold yourself shows you want to become invisible. You know, this thing right now is not bigger or better than you are.”

“I’m going to send him upstairs,” she said to Idrogo, the resource coordinator. “Get him some help, some housing.”

She turned back to the defendant. “Come back on the 30th,” she said. “We need you back making a contribution.”

• Follow the Long Read on Twitter at @gdnlongread, or sign up to the long read weekly email here

• This article was amended on 24 June 2015 to correct an error. Eric Garner died on July 17 2014, before Michael Brown.