In opening statements in Juvenile Court, Riverside County prosecutor Michael Soccio said the now-12-year-old boy wanted to kill his father because of a history of domestic violence.

Soccio dismissed the notion that the neo-Nazi beliefs of Hall contributed to the son’s penchant for violence, as the defense maintains.

‘‘You’ll learn that [the child] would have shot his father even if he’d been a member of the Peace and Freedom Party. It made no difference,’’ he said.

Soccio said the boy told his younger sister the day before the May 2011 killing that he planned to shoot their father and she told him not to.

The boy saw an opportunity on the evening of the killing when his father came home from a party but was locked out and had to get in the house by crawling through a window, the prosecutor said. Hall fell asleep on the couch, and the boy got a gun and shot him while standing by his shoulder, Soccio said.

‘‘He held the gun about a foot away and as he explained, he took four fingers and put them into the trigger and pulled the trigger back and the gun discharged,’’ Soccio said.

Defense attorney Matthew Hardy countered in his opening that his client had grown up in an abusive and violent environment that led him to believe it was good and right to kill people who were a threat to one’s safety and the safety of one’s family.

The boy’s father taught him to shoot guns, took him to neo-Nazi rallies, and once took him to the Mexican border to teach him how to protect his country from illegal immigrants, Hardy said.

‘‘If you were going to create a monster, if you were going to create a killer, what would you do?’’ he said. ‘‘You’d put him in a house where there’s domestic violence, child abuse, racism.’’

Hardy also alleged that the boy’s stepmother, Krista McCrary, who is expected to testify, manipulated the boy into killing Hall because Hall was going to leave her for another woman. Hall sent her text messages that night telling her he would divorce her and had left a party with another woman, Hardy said.

The prosecutor said previously that the boy’s history included being expelled from school for violence at age 5. The violence included choking a teacher with a telephone cord.