A Hudson Valley teacher’s aide raped and sexually abused an underage boy.

On Wednesday in Orange County Court, 46-year-old Mary Thompson of Montgomery was sentenced to 6 years in state prison for raping a boy younger than 17 on two occasions and sexually abusing him once.

In Jan., Thomson was convicted after a bench trial on two counts of rape, two counts of criminal sexual act and two counts of endangering the welfare of a child.

At the time of the crimes, Thompson was employed as a teacher’s aide, but her dealings with the child are not related to her job, officials say.

“This defendant took advantage of a teenager, and knowingly acted in a manner that she knew would be injurious to his mental and moral welfare,” Orange County District Attorney David Hoovler said. “For that conduct, she deserved to be sentenced to state prison. It is disturbing that someone who committed these crimes was a teacher’s aide at the time.”

During the trial, prosecutors argued that on February 17, 2017, and again on February 20, 2017, Thompson took the child to a motel room where they spent the night and engaged in sexual relations.