Upon recovering Moscow from the armies of the Polish–Lithuanian Commonwealth in 1612 at the close of the Time of Troubles, Prince Dmitry Pozharsky attributed his success to the divine help of the iconTheotokos of Kazan, to whom he had prayed on several occasions. From his private funds, he financed construction of a wooden church to the Virgin of Kazan on Red Square in Moscow, which was first mentioned in historical records in 1625. After the diminutive shrine was destroyed by a fire in 1632, Tsar Michael I, ordered it replaced with a brick church. The one-domed edifice, featuring several tiers of kokoshniki, a wide gallery, and a tented belfry, was consecrated in October 1636. Kazan Cathedral was considered one of the most important churches in Moscow. Annually on the anniversary of the liberation of Moscow from Poland-Lithuania, a solemn parade led by the Patriarch and the Tsar carried a processional cross from the Kremlin. By the end of the 17th century, the church building was expanded and received a bell tower and a redesigned entrance. Numerous other renovations of the cathedral were undertaken during the imperial period, notably during 1801, 1805, and 1865, and much of the original design was lost behind later additions. The history of the cathedral was tempestuous, as evidenced by the fact that its archpriest Avvakum led the party of religious dissenters, or Old Believers. The distinguished Russian restorer Peter Baranovsky supervised a complete reconstruction of the church's exterior to its original design in 1929–1932. Some specialists, however, criticised the accuracy of this reconstruction. In 1936, when Red Square was being prepared for holding the military parades of the Soviet Union, Joseph Stalin ordered the square cleared of churches. Although efforts were made by Baranovsky to save it, he could not prevent the Kazan Cathedral from being demolished. In its place, initially a temporary building housing offices for the Communist International was erected. It was later used as a summer café. A temporary chapel marking the original site of the church was built in 1990 as part of the church restoration project, shortly before the collapse of the USSR.
The rebuilding
After the fall of the Soviet Union, the Kazan Cathedral was the first church to be completely rebuilt after having been destroyed by the Communists. The cathedral's restoration was sponsored by the Moscow city branch of the All-Russian Society for Historic Preservation and Cultural Organization, and was based on the detailed measurements and photographs of the original church. However, the icon of the Kazan Virgin in the restored cathedral is a copy; the original is now in the Yelokhovo Cathedral.