A man who allegedly committed at least one sexual assault while a rape kit that implicated him in two 2008 attacks in Berkeley went untested for years has now been charged with raping and murdering a UCSF dental student in 2015, authorities said.

Keith Kenard Asberry Jr., 33, of Antioch was charged Friday in the March 2015 killing in Albany of Randhir Kaur, a 37-year-old from India who was attending UCSF School of Dentistry. Kaur was raped and shot in her second-floor apartment on Kains Avenue, a block east of busy San Pablo Avenue, in the city’s first homicide in more than a decade.

The attack took place nearly eight years after a 19-year-old woman and 15-year-old girl were kidnapped and sexually assaulted in Berkeley. In 2016, a Chronicle investigation revealed that the Berkeley Police Department had failed to test a rape kit from that attack. If the kit had been tested, investigators could have matched DNA from the assailant with Ashberry’s DNA, which had been in a national database since he was convicted of a felony gun crime in 2005.

In February 2015, a 46-year-old woman was the victim of an attempted sexual assault in her home in Berkeley. Police quickly tested the rape kit from that attack, and it produced a match to Asberry. He was arrested four months later and is in Alameda County jail, awaiting trial for that assault and the 2008 rapes.

He was also charged last year in Contra Costa County with a home invasion rape in 2005 in El Cerrito after police there retested evidence using newer technology.

The findings in The Chronicle’s investigation have prompted several lawmakers to propose legislation to eliminate rape-kit backlogs across the state.

The Albany slaying was “absolutely horrifying and tragically avoidable, and exactly why we need every rape kit in the state to be tested,” Assemblyman David Chiu, D-San Francisco, said Wednesday.

Kaur’s body was discovered after UCSF contacted a family member to say she had not shown up for her scheduled appointments. Albany police said Monday that “an exhaustive three-year investigation” had led them to Asberry, who was charged with rape, robbery and murder.

It’s unclear whether DNA was found at the scene. Albany police and the Alameda County district attorney’s office said they could not comment, citing a court order not to talk about the case.

Kaur was a student at the UCSF School of Dentistry’s International Dentist Program, which admits 24 foreign-trained dentists each year. She had been at the university for eight months and was to graduate in June 2016.

California lawmakers have pushed for new laws over the past five years to ensure rape kits are tested, after reports emerged that tens of thousands of the kits have sat on shelves for decades across the country. Victims have expressed frustration at being unable to learn whether their kits were part of the national backlog.

It’s unclear how many untested rape kits there are in California.

Two bills — one by Chiu, to require an audit of how many untested rape kits there are in the state, and another by Sen. Connie Leyva, D-Chino, to require that all future rape kits be tested — are pending in the Legislature.

“I’ve never encountered anyone who thinks these rape kits should not be tested,” Chiu said. “We are behind states like Texas and Kentucky that have implemented stronger reforms to end their backlogs, and California needs to catch up.”

A rape kit is assembled from a painstaking, hours-long process where blood, urine, fingernail clippings, hair and swabs from the mouth, genitals and anus are collected. A victim’s clothes and underwear are bagged as evidence. Photos are taken of her body.

Trained nurses comb over victims, looking for any traces of DNA evidence. Once completed, the kit is given to police, who can have the it tested and analyzed in a lab to see whether it produces a DNA profile that might identify a suspect.

Cities and states that have cleared their shelves of untested rape kits have been able to identify suspects in what had been cold cases. In many cases, they have identified serial offenders.

“Allowing rape kits to sit untested on a shelf means cases go unsolved, serial rapists remain undetected, innocent people are incarcerated and survivors continue to wait for justice,” said Ilse Knecht, director of policy and advocacy for the Joyful Heart Foundation, a national group pushing to end backlogs.

Berkeley police said they can’t explain why the rape kit from the 2008 attack were shelved. In that case, the two victims reported that a man had kidnapped them at gunpoint. He raped the 19-year-old woman and digitally penetrated the 15-year-old girl, then robbed them, they said.

They immediately went to a hospital, where police were called and a rape exam was performed on the 19-year-old.

Alameda County District Attorney Nancy O’Malley previously told The Chronicle that the rape kit from that case was found in 2014 when her office asked law enforcement agencies to conduct an inventory all of their untested kits.

“Had that kit been tested in 2008, we would have known who he was then,” O’Malley said in 2016.

Berkeley police Sgt. Andrew Frankel said there are still no answers as to why the kit went unexamined.

Asked whether the Albany killing and 2015 rape in Berkeley could have been prevented had the kit been tested, Frankel said, that “requires a significant amount of conjecture which I can’t speak to.”

Asberry has pleaded not guilty in the Berkeley cases. He will enter a plea on the new charges of rape and murder on March 28.

In November, El Cerrito police linked Asberry to one of their unsolved cases, a 2005 home invasion rape of a 20-year-old woman. In that case, police said the woman’s rape kit was processed at the time of the crime, but that it was not successful in creating a DNA profile. Newer technology linked the attack to Asberry last year.

Police Chief Paul Keith said the the 2005 home invasion rape stuck with officers in the department over the past 13 years.

“It was a relief to see that he’s been identified,” Keith said of Asberry. “But, it’s tragic to see the other destruction he’s alleged to have caused.”

Melody Gutierrez is a San Francisco Chronicle staff writer. Email: mgutierrez@sfchronicle.com. Twitter: @MelodyGutierrez