WESTFIELD — A man with a mild form of autism maintained his condition prevented him from understanding his Miranda rights, and contended during a hearing in Superior Court in Elizabeth that the taped confession in which he admits to a sexual relationship with a 13-year-old Westfield girl be thrown out.

Derek McDonough, 28, is accused of luring the girl after meeting her on the Internet in 2008. Detectives said they followed protocol in obtaining McDonough’s statement, but today defense attorney Steven Altman argued his client did not have the social skills to fully comprehend what was going on.

"He really couldn’t voluntarily waive his rights and give his statement," said Altman, who will call an expert to testify about Asperger’s syndrome, a mild form of autism, when pretrial hearings continue next week.

At the first hearing today, McDonough silently bowed his head as his videotaped confession was played in court. The Plainsboro man, with a heavy beard and long black hair, sat handcuffed in navy prison coveralls and rarely glanced up at the video or at his parents in the court’s gallery.

He is facing up to 46 years in prison for all the charges, which include sexual assault, luring, endangering the welfare of a minor, criminal sexual contact and witness tampering, authorities said. McDonough has a prior conviction for a sex offense in 2005.

On the video, he told detectives he met the girl, who lives in Westfield, on the social networking site MySpace. For the next six months, he said they chatted online, over a webcam and on cell phones dozens of times a day. They met several times in person to engage in sexual activity, often at public parks in Westfield, he said.

During questioning, which lasted more than an hour, McDonough said he knew the girl’s age but continued to see her. At times he grew agitated and sobbed.

"I have deep feelings for her, I do," he told the detectives.

The sexual encounters also took place at McDonough’s parents’ house in Plainsboro, where he lived, the victim said. Her parents contacted police in July 2008 after becoming suspicious about their daughter’s internet activity, and McDonough was arrested hours later, authorities said.

Arresting officers said they found McDonough standing outside his house, drinking a beer and smoking a cigarette. Police seized computers from McDonough and the teen, along with telephone records.

After his arrest, McDonough continued to call and send text messages to the girl in an effort to influence her not to testify, according to Assistant Prosecutor David Hummel.

He said McDonough clearly understood and freely waived his Miranda rights.