A teen on trial for capital murder following the death of Michael Robinson during a home invasion took the stand on Tuesday in his own defense.

Jonathan Perales, 19, remained emotionless during his confession in which he took the blame, saying he knew he was wrong for breaking into Robinson's home last year.

"I just proceeded to the house, started looking around for stuff, anything that I could take, money," Perales said.

He said that he took four Xanax bars consecutively the night he randomly choose to break into a home in Universal City.

"It messes with your memory and makes you do things you, really, most of the time you wouldn't do but in the back of your mind, you do know from right and wrong,” Perales said.

He recounted walking in through an unlocked back door and packing his car trunk with stolen goods from the home. He said that on his third trip inside, things took a turn.

“I heard a gentleman yell, ‘get out of my house,’ and by that time, I was by the garage door and I said, ‘I'm going,’ and I tried to find the front door," Perales recalled.

He claims that he attempted to retrace his steps to get out of the house but instead he ended up in a confrontation with Robinson.

“I was met with two gunshots, one to my chest and one to my arm, and instinctively, out of reaction, I guess I fired two shots back and stumbled my way out of the house, " Perales said.

A Texas Ranger testified in court that, based on evidence, he believed Robinson fired off the first round.

"I know it was his right to shoot at me and I was in the complete wrong,” Perales admitted.

Robinson's family was in the courtroom for the testimony. One of his sons says his family is leaving Perales' fate in God's hands.

If found guilty, Perales could face life in prison without patrol.