The Chapel of the Holy Shroud in Turin reopens today (27 September), 21 years after it was almost entirely destroyed by fire and 28 years after it was closed because a chunk of marble had fallen from a cornice.

A masterpiece of Baroque architecture, designed by the mathematician priest Guarino Guarini, it was commissioned in 1668 by the Savoy ducal family to house its most prestigious possession—the linen cloth believed to have wrapped the body of the dead Christ.

The chapel is raised up behind the high altar of Turin Cathedral and opens into the state rooms of the royal palace, emphasising the importance of the Holy Shroud to the history and aspirations of the house of Savoy.

The origin of the fire that raged throughout the night of 11 April 1997 remains a mystery. It burned especially fiercely because the chapel, which had just been restored, was still full of wooden scaffolding. A dinner for the then secretary-general of the United Nations, Kofi Annan, was being held next door in the palace while firemen struggled to break into the bulletproof case containing the relic, which was rescued undamaged.

The long delay in restoring the chapel began with a lengthy judicial seizure of the site while fruitless attempts were made to find out whom to blame for the fire.

In the absence of architectural drawings or other documents, this was followed by a detailed analysis of the daring structure of the building, which boasts a self-supporting dome with interlocking marble blocks. There was then a lengthy period of disagreement over how much of the original material to reuse, because after the fire, the floor of the chapel was a metre deep in calcinated marble fragments and semi-molten bronze architectural mouldings.

The decision was finally made to replace 1,150 badly damaged elements and consolidate the remaining 4,000. The quarry at Frabosa in Piedmont, from which the black and grey marble was originally extracted, was reopened for this purpose.

Further delays were caused by two public displays of the Holy Shroud (in 1998 and 2000) and a legal challenge to Corit, the firm that won the 2009 competition to carry out the work but was fired in 2011, to be replaced by Arcas in 2012.

The restoration work, led by the architect Marina Feroggio, has been a state-of-the art project in which the damaged fragments have been incorporated and then patinated so that they blend in with the new marble. As Luisa Papotti, the superintendent for archaeology, fine arts and landscape in the Piedmont region, says: “This has not been a rebuilding, but a conservation project.” The extraordinarily complex architecture of the chapel stands again without support, relying only on its original engineering by Guarini.

The cost has been more than €30m, of which €28m has come from the ministry of culture and €2.7m from the foundation of the Compagnia di San Paolo.

Visitors will no longer climb up the stairs into the chapel from the cathedral, but will enter it from inside the royal palace, while the Holy Shroud will remain in the cathedral. Enrica Pagella, the director of the royal palace, says: “The reopening of the chapel is a challenge we have [conquered] due to the commitment of many, particularly the specialists in the superintendency, who have never wavered however great the problems they faced.”