OAKLAND — The mother of a convicted murderer, who killed an 8-year-old girl in 2013 and could be sentenced to death, painted a picture of her son’s troubled childhood in court on Tuesday.

Darnell Williams, 25, of Oakland, was convicted this month of killing Alaysha Carradine and Anthony Medearis, 22, in 2013. A jury will recommend in the penalty phase of his trial if he should receive the death penalty or life in prison without the possibility of parole.

Williams’ mother, Sheila Smith, took the stand Tuesday. She testified how her son nearly died at birth; doctors had to perform an emergency surgery to deliver him. Smith bounced around from different homes growing up, since both his parents were either in jail or prison. Williams, too, began getting into trouble early on, lighting a shoe on fire, for example, at the age of 5, his mother said.

“My son is a mama’s boy,” she said.

Dr. Gretchen White, a psychologist who also testified, said Williams had an “unusually close bond” with his mother. As a teenager, Williams called her his wife and said he didn’t need to marry anyone because he was already married to his mother, White said. Although he was never diagnosed with any mental illness, Williams would act out at a young age in order to see if his mother, who was usually incarcerated, would show up, White said.

Smith said Williams was on the football team in middle school when they lived in Modesto and was being recruited to attend a private academy. He refused to play unless his mother was at the game, wearing his football jersey.

His maternal grandmother was a crack-cocaine addict, who stabbed her husband, White testified. Nearly every man in his life growing up, including his father and uncles, were felons. Criminal behavior became almost normal to him as a child growing up, White said. This led to teasing at school from a young age and a long history of behavioral problems, White said.

Darnell Williams Sr., his father, also testified in court. His father had a long criminal history, stating that he had been incarcerated about 16 times. When asked by defense attorney Darryl Billups why he decided to come to court Tuesday, he said it was to apologize.

“I’m here to see and apologize to my son, for not being a good daddy,” his father said. “I wasn’t a good dad, I was a drug addict.”

Williams Sr. said that he knew there was a warrant out for his arrest and that he would be arrested once he left the courtroom. District attorney police investigators followed him out.

“I’m here to speak on anything I can say that can save my son,” he said, holding back tears.

He testified that he wanted his son to be nothing like him. Both father and son were convicted in a 2009 shooting in which Williams Jr. shot at a man in Berkeley, after his father allegedly told him to.

His mother, who had been to jail and prison multiple times for fraud and forgery charges, testified that she too, told her son growing up that she did “enough wrong” so Williams and his sister wouldn’t have to.

“I told them, ‘I’m keeping up with the Joneses’ so you won’t feel like you have to rob, steal or kill,'” she said.

The prosecution presented evidence of Williams’ criminal history, including a prior felony conviction for the 2009 Berkeley shooting, and robbery and assault incidents against inmates while he was in jail or prison.

The defense will continue with its presentation of evidence Wednesday.