A federal appeals court says a New York man who has spent 22 years behind bars for a murder conviction should get a new trial or be released from prison.

Hector Rivas was convicted in the 1987 killing of Syracuse nurse Valerie Hill.

The 2nd U.S. Circuit Court of Appeals said Wednesday that a defense lawyer at his 1993 trial failed to adequately challenge evidence. The court says the trial defense amounted to "no defense at all."

The appeals court said previously that Rivas had presented a "credible" and "compelling" claim of innocence.

The panel called Rivas' challenge to his conviction an "exceedingly rare and exceptional case."

An assistant state attorney general did not immediately return a message seeking comment.

Rivas' appeals lawyer, Richard Langone, called the ruling "wonderful."