(Dan Morse/The Washington Post)

Maryland prosecutors dismissed a sex-abuse case against a counselor at a popular child-care program in Rockville on Thursday, confirming the long-held belief by the counselor and many parents who know him that he should never have been charged.

“I knew I was innocent from the start,” Raul Ramos, 21, said after a final hearing in Montgomery County Circuit Court.

The allegations, filed by police five months ago, were widely reported in news accounts.

Ramos was accused of inappropriately touching a 5-year-old girl several times — at least once while playing tag. The charges cost Ramos his job.

As he prepared for a trial, Ramos agreed to undergo a polygraph test administered by a firm hired by his attorney.

Raul Ramos, center, and his parents, Ana Ulloa and Luis Ramos, outside the Montgomery County Circuit Courthouse after charges against Raul Ramos were dropped Thursday. (Dan Morse/The Washington Post)

In that exam, Ramos answered no when asked specific questions about the alleged touching of the girl and said he never had played tag with the child, according to the polygraph report, the results of which indicated no deception. Ramos’s attorney gave the exam results to prosecutors as part of his efforts to disprove the accusations.

“The prosecutors took a very hard look at this case, and decided to get rid of it,” said the attorney, Andrew Jezic. “I commend them for their fairness.”

In court Thursday, Assistant State’s Attorney Ashley Inderfurth gave brief remarks, using a court term for dropping charges: “Thank you, your honor, the state will enter a Nolle prosequi in this case.”

“Okay,” Circuit Court Judge Mary Beth McCormick said, “it’s done.”

A spokesman for the state’s attorney’s office later said the case would have been difficult to prove. “The prosecutor in the matter decided there was not enough evidence to convince a jury beyond a reasonable doubt that this defendant was guilty and thus we decided the case should be dismissed,” said the spokesman, Ramon Korionoff.

Melissa Moore, who has a first-grade son and third-grade daughter who had been supervised by Ramos, was in court Thursday to support him, along with 20 other friends and family members of Ramos. In an interview, Moore said she and her husband would still trust Ramos to babysit their children. “We would have no concerns about that at all,” she said. “He’s really an upstanding and incredible individual.”

Moore said she worries about the lasting effect of the allegations. “I know this could make his life difficult,” she said.

For two years, starting in 2014, Ramos had worked for Kids After Hours, which runs child-care programs at 21 elementary schools throughout Montgomery County. He was one of about 13 staff members who worked in before- and after-school programs at Flower Valley Elementary School.

“He is a nice, caring, empathetic young man,” said Bob Sickels, owner of Kids After Hours, which he and his wife founded in 1989. “He was everything we looked for in a staff member.”

In the wake of the arrest, Sickels terminated Ramos. “It was not something I did happily,” he said Thursday.

Ramos has a benign, almost naive bearing, Jezic said, which had children and parents drawn to him.

Last year, a 5-year-old girl from the program reported the alleged abuse to a relative, who contacted authorities, according to court records. Detectives from the Montgomery County Police Department questioned Ramos.

In that interview, Ramos appeared stunned by their questions, according to a transcript of the interview prepared by Jezic’s office from police recordings. At one point Ramos started to cry.

“I would never touch a kid that way,” he said, according to the transcript. “Never. I’ve been working with kids for two years. I would never do that.”

In the interview, Ramos said that one day he picked the girl up and carried her to one of her relatives. Maybe she misinterpreted what he was doing, Ramos told the detectives.

“It was probably an accident if she really thought that I touched her,” he told the detectives. “Why would I do that on purpose? She’s a kid.”

On Nov. 10, police charged Ramos with three counts of third-degree sex offense and one count of sex abuse of a minor. A month later, prosecutors presented the case to a grand jury and secured an indictment against him.

Sickels held a meeting for parents and tried to talk to as many as he could. He said a large number of the more than 100 parents whose children regularly went to the Flower Valley program thought Ramos was innocent. “He had tremendous parental support,” Sickels said.

As the case moved to trial, Jezic said, he told prosecutors Ramos would testify and “the jury was going to love this guy.”

This week, Jezic told Ramos and his mother, Ana Ulloa, the case was going to be dismissed. She fell to the ground crying in relief. “I was born again,” she said.

Ramos said he might pursue heating and air-conditioning jobs.

Sickels would not say Friday whether he had offered Ramos back his job or had plans to do so.

Jezic also declined comment on the matter. He said Ramos has not applied for any child-care jobs since the charges were dropped.

Ramos said he would like to work with the children again, but the experience has made him leery.

“It’s hard for me to decide to go back into that field,” he said.