Artificial intelligence may have helped solve a long-standing mystery surrounding Raphael’s Madonna and the Rose, which is on display at the Prado Museum in Madrid, reports The Guardian.

The masterpiece depicts the Virgin Mary with Christ, John the Baptist, and St. Joseph. The artwork has intrigued art lovers and experts for centuries. All because of doubts about its authorship that arose in the 19th century.

At first, it was believed that the painting was painted by Raphael. But over time, some art historians suggested that the figure of Joseph could not have been painted by an Italian artist.

There were also disputes about the lower part of the painting – some believed that it was created by another author. They tried to clarify the situation with the help of AI, using an algorithm developed by a professor at the University of Bradford.

The AI concluded that most of the painting was by Raphael, but that Joseph’s face was painted by a different hand. The lower part is “most likely” also by Raphael.

The AI algorithm first analyzed 49 other works by the artist in detail. It was able to recognize the artist’s authentic works with 98% accuracy. This discovery is part of a new article published in the journal Heritage Science.