Updated

A man accused of firing at least a dozen bullets into a Southern California house that killed a 3-year-old girl and wounded a pregnant woman and her young daughter pleaded not guilty on Friday.

Brandon Barnes, 19, entered the plea to charges of murder and attempted murder in the Monday night shooting in San Bernardino. Authorities said Barnes fired the shots after a male resident intervened earlier in the day when he saw the suspect hitting a woman outside a nearby market.

Barnes was arrested just after 5 p.m. Wednesday as he rode his bicycle two blocks from the crime scene. Police have not recovered the weapon.

By the time the shooting was all over, Sophia Cardona's pregnant granddaughter and 3-year-old great-granddaughter were hospitalized in critical condition and another young relative was dead of a gunshot wound to the head.

"My granddaughter's husband, he tried to help the woman and for helping her, this is what happened," Cardona said Thursday. "Sometimes, you can't help everybody, especially if you don't know what the person is like."

Nylah Franco-Torrez, 3, was pronounced dead after the shooting.

Police declined to release the names of the surviving victims, but Cardona identified the pregnant woman as her granddaughter, 21-year-old La Donna Howie, and Howie's daughter, Justine Aguilar.

Howie's daughter, who was also shot in the head, is in a medically induced coma because of brain swelling, Cardona said. She is responding to people by moving her hand, authorities said.

The attack was one of four shootings in San Bernardino between Monday night and Tuesday morning and marked an end to more than two months without a homicide in the desert city 60 miles east of Los Angeles.

District Attorney Michael Ramos called the shooting "horrendous" and a "cowardly act," and vowed justice in the case. "We will not allow this to happen to our citizens, especially our babies," he said.

A call to public defender Samra Roth was not immediately returned.

Bail was set for Barnes at $2 million and was ordered to return to court Sept. 26, prosecutors said.

Court records show Barnes had an outstanding warrant for his arrest on a misdemeanor charge of loitering by a school. He was arrested on allegations of fighting in a public place a year ago, but the case was dismissed after Barnes struck a plea deal.