A child sobbed as she was embraced by family members and escorted out of a courtroom in downtown Charleston Wednesday afternoon.

Moments earlier, a pastor sitting on the other side of the courtroom from the child and her family, raised his hands in the air to rejoice after a verdict was read in the case against Kirby Wright, a 48-year-old former high school janitor.

Wright had been accused by that child of sexually attacking her, but a jury found him not guilty on all charges.

The jury deliberated for about three hours before acquitting Wright of first-degree criminal sexual conduct with a minor and lewd act upon a minor.

On Tuesday, when the trial began, prosecutors had called the child to the stand, where she testified about what she said Kirby did to her about four years ago.

The child, who will remain unidentified, told the jury Wright sodomized her on one occasion and molested her in a second occasion while he babysat her at his home, according to her testimony. She said she was either 9 or 10 years old at the time.

The child, now 13, told the jury Kirby threatened to stab her in the heart if she told anyone.

About a year later, the child told her mother through a text message that Kirby, who was a family friend, had raped and molested her, according to her testimony.

During her testimony, the child became frustrated during cross-examination by Kirby’s attorney, Eduardo Curry, who questioned specific dates and times of the alleged incidents.

“I’m really trying to hold my patience. You really don’t know how it feels to have something like this happen to you,” the child said while in tears during Tuesday’s testimony.

During his closing statement Wednesday, Curry said the child was abrasive with him while on the stand.

Ninth Circuit Assistant Solicitor Debbie Herring-Lash addressed the child’s behavior. “You saw a full range of emotions from her. On the tape (taped interview) you saw a sad tearful child. In here in court, you saw anger and frustration,” she told the jury. She also reminded the jury of earlier testimony from an expert that children can react differently to those situations.

Herring-Lash also told the jury the child had absolutely no reason to fabricate the accusation. “She has no motive to make this up, nothing to gain by saying this,” she said during her closing statement.

The child herself told Curry during her testimony that she would not make it up. “What child would stand before all these people and tell them something that’s so embarrassing?” she said Tuesday.

Wright, who did not testify or present any witnesses, remained quiet after the verdict was read, but wiped away some tears. If he had been convicted, he faced 25 years to life in prison.

Supporters sat behind Wright, across the room from the child’s family. Many sat in silence while the judge released the jury. The child’s mother tried to comfort her but her cries could be heard from the hallway as she was ushered away.

Curry, who had told the jury the child had changed her story, said justice has spoken. “Mr. Wright is a free man and once again the best legal system in the world has done its best job,” he said.

Reach Natalie Caula at 937-5594 or Twitter.com/ncaula.