Specially trained dogs will be allowed to accompany children and developmentally disabled adults to the witness stand in Illinois courtrooms under a new law passed last month.

Illinois isn’t the first state to welcome dogs into its courtrooms to assist vulnerable witnesses. Laws differ from state to state, but comfort dogs have been used to calm nerves and ease witness testimony for more than 20 years now.

Research shows that dogs lower the stress hormone cortisol, and simply the act of petting a dog lowers heart rate and blood pressure.

A dog’s calming presence can make all the difference in court, especially when it comes to children testifying against an abuser.

Appearing in court can be a stressful experience, and studies have found that testifying can even amplify trauma for young victims.

“Instead of focusing on the trauma they have experienced, the memory many children have about court is spending time with the dog,” Pennsylvania Supreme Court Justice Max Baer recently said in a statement encouraging the use of comfort dogs in courts.

There was relatively little controversy over the presence of comfort dogs in courtrooms until 2011 when a golden retriever named Rosie appeared in a New York court alongside a 15-year-old rape victim testifying against her father.

Rosie sat by the teenager’s feet, and when the girl hesitated with her answers, Rosie gently nudged the girl with her nose, encouraging her to continue with her testimony.

The girl’s father was convicted and sentenced to prison, and after the trial’s conclusion, the teen’s psychologist told The New York Times that his patient was “most grateful to Rosie above all.”

However, the case — and Rosie herself — made headlines when the defendant’s lawyers filed an appeal, arguing that the golden retriever’s presence made the teenager unduly sympathetic to the jury

Advocates for courtroom dogs watched the case closely, knowing it could affect the dogs’ use in courtrooms nationwide, and in 2013, four justices unanimously ruled that the defendants’ lawyers failed to show that Rosie was impermissible under state law.

To learn more about the use of comfort dogs in courtrooms, visit the Courtroom Dogs Foundation, a nonprofit that educates the public about the benefits of the dogs and guides government agencies to develop programs for them.