The 17th-century painting by Giovanni Francesco Barbieri, known as Guercino, had been snatched during a night-time robbery from a church in the northern Italian city of Modena in 2014.
It was recovered thanks to a wealthy Moroccan businessman and art collector, who was offered it for some 940,000 euros ($1 million) by three dealers in Casablanca, according to the local Gazzetta di Modena.
The connoisseur recognized the painting immediately as a Guercino and tipped off the police.
The “Madonna with Saints John Evangelist and Gregory the Miracle Worker”, painted in 1639, is valued by art historians at between five and six million euros ($5.3 and $6.3 million).
“The Moroccan authorities contacted us through Interpol to say that a large canvas that could be linked to a theft in Italy had been recovered during an investigation,” the police said in a statement.
The police sent an urgent message back asking the Moroccans to “secure the canvas” so it could be returned “as soon as possible”.
Barbieri (1591-1666), who was cross-eyed and went by the name Guercino (The Squinter), is known for his naturalist, Caravaggesque style.