OAKLAND -- Police and prosecutors on Tuesday announced arrests in the July slaying of 8-year-old Alaysha Carradine, who was gunned down while at a slumber party here in what authorities say was an attempted retaliation for the killing of a Berkeley man earlier in the evening.

The slaying of the girl, known by her family as “Ladybug,” shook a city that is in many ways numbed by a high crime rate, and prompted legislation now on the governor's desk that would allow Oakland to create its own gun registry.

Oakland police said at a news conference Tuesday that they received help in their investigation of Alaysha’s slaying from Berkeley police and the state Department of Justice.

Charged with murder in her death were Darnell Williams Jr., 22, believed to be the shooter, and Joseph Carroll, 27. Williams faces lying-in-wait enhancements that make him eligible for the death penalty, prosecutors said.

According to a complaint filed by the Alameda County district attorney’s office, both have been charged with murder and multiple counts of attempted murder in connection with the July 17 incident, which left a 4-year-old boy and 7-year-old girl who lived in the home wounded along with their grandmother.

A police officer’s declaration says the shooting was planned as retaliation for the killing of Carroll’s cousin, Jermaine Davis, in Berkeley earlier that evening. Williams was close to Davis, whose “friends, family and associates … quickly focused on an adult male ... who they believed killed Davis.”

The pair believed that the children of the target, whom authorities refer to as "John Doe," lived in the Wilson Avenue house where Alaysha was visiting, along with their mother. Williams and Carroll armed themselves, according to the documents, and Williams rang the doorbell about 11:18 p.m. and “waited outside the door, pointing a firearm at the door."

"As the children began to open the door, Williams fired numerous shots at the children through the doorway,” the declaration said.

At the news conference, Dist. Atty. Nancy O’Malley decried the brazen shooting, saying, “It is shocking and it is upsetting that kids in Oakland are so vulnerable to this violence and the complete disregard for human life by some of these individuals who are involved in gang activity.”

Carroll had earlier visited the Wilson Avenue apartment searching for the target, but then traveled to John Doe’s mother’s house in Antioch to wait for him there, police said. He did not succeed in locating or shooting the man.

Williams and a friend, Laquana Nuno, have also been separately charged with the Sept. 8 slaying of another Berkeley man, Anthony Medearis, 22, whom Williams attempted to rob during a game of street dice, officials said. Nuno agreed to pick him up after the attempted robbery, which ended with Williams shooting Medearis, officials said.

During the shooting, a bullet fragment also hit Williams’ 7-year-old nephew in the eye, the charging documents contend.

Carroll, meanwhile, was separately charged along with two others with conspiring to murder another man in September in a gang retaliation for alleged disrespect, documents show. They were unsuccessful.

Oakland has recently seen a steep rise in gun crimes, particularly armed robberies, although homicides are down slightly this year over last.

ALSO:

UC Berkeley explosion: Most power restored to campus

Santa Monica Airport remains closed as crash probe continues

Burbank City Council to honor five youths killed in weekend crash

Twitter @leeromney

lee.romney@latimes.com