It was a cold case that had eluded investigators for more than two decades. A little girl with no name had been stuffed into a cooler and left beside a Manhattan highway. On Saturday, however, the mystery seemed to have been lifted with the arrest of a cousin of the girl, known as Baby Hope, the police said.

And the girl’s name had finally been restored: Anjelica Castillo, who was born in Elmhurst Hospital Center in Queens in 1987 and was 4 years old when she died.

The cousin, Conrado Juarez, 52, who lives on Richmond Plaza in the Bronx, was apprehended on Friday at the Greenwich Village restaurant where he worked, Police Commissioner Raymond W. Kelly said. On Saturday morning, Mr. Kelly added, Mr. Juarez confessed to sexually abusing and murdering the girl and, with the help of one of his sisters, putting the body in a picnic cooler and leaving it near the Henry Hudson Parkway in 1991.

It was there, on July 23 of that year, that construction workers discovered the remains. Detectives named her Baby Hope as a symbol of their refusal to give up until they found her killer and gave her back her real name.