OAKLAND, Calif. (KGO) -- The man accused of stabbing Nia Wilson to death at the Macarthur BART station took the stand in his own defense Tuesday morning in an Oakland courtroom.
John Cowell has entered a plea of not guilty by reason of insanity. The judge has ruled him competent to stand trial. He is also accused of stabbing Wilson's sister, who survived the attack.
RELATED: Heartbreaking testimony from Nia Wilson's sister in deadly BART stabbing trial
Cowell was robotic while testifying, staring straight ahead and showing no emotion.
He said he acted to defend his family, adding that he thought Wilson and her sisters were aliens who were about to harm his grandmother.
His lawyer says he is mentally ill and was suffering from delusions.
His defense attorney started by asking him about his mental history. Cowell testified that he had been diagnosed with schizophrenia, depression and bi-polar disorder. He talked about hearing alien voices, radio transmissions and fake skin, which he explained is when aliens do surgery on people. He said you don't recognize them because they have fake skin.
RELATED: Man accused of killing BART rider Nia Wilson thrown out of court during trial opening statements
Wilson's mother was in the courtroom for the testimony. She had tears rolling down her face while sitting in the lobby waiting for the courtroom to open.
Police have said the attack on Nia Wilson was unprovoked and random.
Prosecutor Butch Ford dropped a bombshell in court during his cross examination. He said Cowell called an African American woman the N-word on an AC Transit but just after the stabbing. That prompted gasps in the courtroom and shocked even family members.
If Cowell is convicted, he could be sentenced to life in prison without parole.
See more stories and videos related to Nia Wilson.
ABC7's Ed Walsh contributed to this report.
John Lee Cowell gives bizarre testimony in trial for murder of Nia Wilson at BART station