CONCORD, N.H.-- A judge on Monday dismissed charges against a man accused of drowning his 11-year-old stepdaughter after finding him incompetent to stand trial.

Prosecutors said the man confessed to killing the stepdaughter five years ago because he believed he had impregnated her. But defense attorneys suggested another man living in their home was the killer.

Wendell Noyes, 42, was charged with murder in the July 2011 death of Celina Cass, whose body was found six days after she was reported missing, wrapped in a comforter and weighed down by a sandbag in the Connecticut River. Noyes was arrested in June at the state psychiatric hospital, where he had been hospitalized after being found incompetent to stand trial on unrelated misdemeanors.

Wendell Noyes arraigned for murder of Celina Cass WBZ-TV

Judge Paul Desjardins on Monday granted the prosecution’s request to dismiss the charges, find that Noyes is dangerous to himself or others and require him to be evaluated for involuntary commitment. In a separate motion, his attorneys argued that he was not dangerous and said the state lacked evidence linking him to the girl’s death.

Get Breaking News Delivered to Your Inbox

Defense lawyers instead pointed to Kevin Mullaney, whose father was a former boyfriend of Celina’s mother. Mullaney, who was 22 at the time, is serving two to six years in prison for receiving stolen property and other charges.

According to Noyes’ attorneys, Celina’s pajama bottoms and underwear were found stuffed in a tire in the back of Mullaney’s truck and semen on a pair of sandy, muddy boxer shorts found in her clothes hamper tested positive for Mullaney’s DNA.

It was unclear whether Mullaney has an attorney. According to prosecutors, he has denied involvement in the girl’s death and said Noyes must have planted her clothing in his truck to frame him.

#BREAKING: NH Court finds Wendell Noyes not competent to stand trial in the murder of his 11-yr-old stepdaughter. #WBZ — Brad Tatum (@BradTatum) February 27, 2017

Investigators say Noyes made numerous inconsistent statements about where he last saw Celina the night before she was reported missing, how many beers he drank that night and what time he got up the next morning. Three days after Celina disappeared, he told a reporter the family was “grieving,” which struck investigators as unusual and indicative of knowing that she was dead.

A sandbag was missing from the back of his truck, and during the search for the girl he led investigators on a route that was “basically a circle around the body,” police said.

A jail inmate who served time with Noyes in 2015 told investigators that Noyes confessed to the killing, though police say that man’s credibility has not been established. The inmate said Noyes admitted that he and another man had been having sex with his stepdaughter and “they had to get rid of her” because they thought she was pregnant.

After a months long competency evaluation the judge in the #celinacass case agreed Wendell Noyes could not face charges. pic.twitter.com/8tuMEj7GWx — KarynRegal (@Karynregal) February 27, 2017

At the time of Noyes’ arrest, Louisia Cass said she hoped her ex-husband would end up in prison rather than the hospital. She said Noyes had seemed like a loving and caring husband but as time passed after Celina’s death she began to believe he was responsible.

“I hope he rots in hell,” she said.

The girl’s disappearance led to an intense search by federal, state and local law enforcement in the tiny North Country town of Stewartstown, a mile from the Canadian border.