A man who spent nearly 25 years on California's death row was freed Thursday after his conviction in the rape and killing of his girlfriend's nearly 2-year-old daughter was overturned.

Vicente Benavides, 68, was released from San Quentin State Prison following a judge's order, according to the California Department of Corrections and Rehabilitation.

Benavides, who had been on death row since June 1993, was freed after the state Supreme Court ruled last month that false medical testimony was presented at his trial.

The Innocence Project, which helped secure Benavides' freedom, tweeted a photo of him and one of his attorneys posing along San Quentin's Main Street shortly after his release.

Footage by local TV stations showed a tearful Benavides reuniting with and hugging family members and posing for selfies.

Kern County District Attorney Lisa Green said earlier this week that she wouldn't retry Benavides for first-degree murder and that without the medical testimony, a lesser conviction would be nearly impossible.

"Upon an objective review of the facts, there is insufficient evidence to establish guilt beyond a reasonable doubt," she said in a statement.

Benavides was babysitting his girlfriend's daughter, Consuelo Verdugo, in Delano while her mother was at work on Nov. 17, 1991. Benavides told police that he had lost track of the girl and later found her injured outdoors. He and the girl's mother took her to an emergency room and she died a week later.

A forensic pathologist concluded that the girl died from injuries idicative of being sodomized, and several doctors testified that the girl's injuries were caused by sexual assault.

But nearly all later recanted, saying they hadn't seen her full medical records that indicated there was no evidence of sexual assault when the girl was first hospitalized.

They also said her genital and other injuries may have been caused by her medical treatment and some said the purported cause of death was "anatomically impossible," according to the state Supreme Court's ruling.

One expert on child abuse said the girl likely had been hit by a car, not sexually assaulted.

It's unclear whether Benavides plans to stay in California or return to his native Mexico.

California has the nation's largest death row with nearly 750 inmates. Only 13 have been executed since 1978 — the last in 2006. Currently, condemned inmates are more likely to die of old age during decades of appeals.