A painting by Gustav Klimt that was stolen from an Italian museum almost 23 years ago — only to be found inside one of the museum’s walls last month — is authentic, an Italian prosecutor announced on Friday at a news conference.

X-rays of the painting, called “Portrait of a Lady,” were key to its authentication, Jonathan Papamarenghi, a councilor in Piacenza, where the museum is, said in a telephone interview. The X-rays showed that another portrait of a woman was underneath the painting, as had been expected, he said.

It had the museum’s stamp on it as well, Mr. Papamarenghi added.

A team of experts led by Claudia Collina of the Institute for Cultural Heritage in Bologna verified the work, he said.

The whereabouts of “Portrait of a Lady” has been one of the art world’s biggest mysteries since the painting was stolen from the Ricci Oddi museum in 1997.