NORRISTOWN, Pa. - -

A Montgomery County man on trial for stabbing three members of his family has been found guilty of first degree murder, but mentally ill.

Police said Joseph McAndrew Jr. used an 18 inch dagger to kill his mother, Susan McAndrew, 64; father, Joseph McAndrew, 70; and twin brother, James McAndrew, 21 at their home in Upper Merion Township in March of 2011.

"They have been through a lot where their sibling killed their father, mother and twin brother," said Montgomery County First Assistant D.A. Kevin Steele, speaking on behalf of the two half sisters of Joseph McAndrew Jr.

McAndrews had used an 18 inch samurai style dagger to stab his mother 16 times, his father five times and his twin brother, James, 20 times.

A psychiatrist had testified that McAndrew knew what he was doing at the time of the murders more than three years ago.

But Dr. Timothy Michaels testified Monday that 27-year-old Joseph McAndrew Jr. was so delusional that he didn't know his actions were wrong.

Throughout the trial the defense pressed for a not guilty by reason of insanity verdict, which could have eventually put McAndrew back on the street.

However the prosecution said McAndrew was a cold-blooded killer who despised his family, killed them and tried to cover it up.

Defense attorney Paul Bauer had wanted a judge to find his client not guilty by reason of insanity. He said his client had stopped taking medication months before the murders.

The judge ultimately decided that McAndrew was guilty of three counts of first degree murder, but also found him to be mentally ill.

"He'll never be a free man. If he is ultimately sent to state hospital for treatment --if at some point no longer needs treatment-- we'll send him back to prison," Bauer said.

The prosecution says it offers closure to family and takes away the fear that McAndrew could one day come for them.

"Based on his actions in this case that was a legit concern when he killed the rest of his family that he would harm others," Steele said.

McAndrew had waived his right to a jury trial. In exchange for that, prosecutors took the death penalty off the table.

He is due back in court for an evaluation in the next 90 days.