MADRID (Reuters) - Madrid's Prado Museum unveiled a painting by Italian baroque master Caravaggio on Monday that will go on public display for the first time this week after what the museum has described as one of the greatest discoveries in the history of art.

The trace of "Ecce Homo" (Behold the Man) had been lost since the 19th century before re-emerging three years ago, when the painting, initially attributed to an unknown Spanish painter, was about to go under the hammer in Spain for a fraction of its value.

Caravaggio, who died in 1610 in his late thirties after a turbulent life, was a master of using the "chiaroscuro" technique of lighting to make his subjects seem to come alive.

The depiction of a suffering Jesus Christ in a crown of thorns was painted between 1605 and 1609, shortly before Caravaggio's death, and is believed to have once belonged to King Philip IV of Spain.

"We can now fully enjoy all the nuances, all the subtleties, the enormous beauty that Caravaggio expresses through his version of the Ecce Homo," David Garcia Cueto, head of the department of pre-1800 Italian and French painting at Madrid's El Prado Museum, told reporters on Monday.

Its new owner, an international art collector based in Spain, has sealed a deal with the museum to keep the artwork on display until October, although it could be extended as the owner's intention is to showcase it permanently.

In 2021, Spain blocked the auction of the painting after experts suggested it might have been the work of Michelangelo Merisi da Caravaggio rather than an unknown peer of 17th century Spaniard Jose de Ribera, who was thought to have painted it.

Art history professor Maria Cristina Terzaghi then traced the painting to its previous owners, the family of 19th-century politician Evaristo Perez de Castro.

(Reporting by Emma Pinedo, editing by Andrei Khalip)