The inspiration for Sacré Cœur's design originated on September 4, 1870, the day of the proclamation of the Third Republic, with a speech by Bishop Fournier attributing the defeat of French troops during the Franco-Prussian War to a divine punishment after "a century of moral decline" since the French Revolution, in the wake of the division in French society that arose in the decades following that revolution, between devout Catholics and legitimist royalists on one side, and democrats, secularists, socialists and radicals on the other. This schism in the French social order became particularly pronounced after the 1870 withdrawal of the French military garrison protecting the Vatican in Rome to the front of the Franco-Prussian War by Napoleon III, the secular uprising of the Paris Commune of 1870-1871, and the subsequent 1871 defeat of France in the Franco-Prussian War.
Though today the Basilica is asserted to be dedicated in honor of the 58,000 who lost their lives during the war, the decree of the Assemblée nationale, 24 July 1873, responding to a request by the archbishop of Paris by voting its construction, specifies that it is to "expiate the crimes of the Commune". Montmartre had been the site of the Commune's first insurrection, and the Communards had executed Georges Darboy, Archbishop of Paris, who became a martyr for the resurgent Catholic Church. His successor Guibert, climbing the Butte Montmartre in October 1872, was reported to have had a vision, as clouds dispersed over the panorama: "It is here, it is here where the martyrs are, it is here that the Sacred Heart must reign so that it can beckon all to come"
In the moment of inertia following the resignation of the government of Adolphe Thiers, 24 May 1873, François Pie, bishop of Poitiers, expressed the national yearning for spiritual renewal— "the hour of the Church has come" that would be expressed through the "Government of Moral Order" of the Third Republic, which linked Catholic institutions with secular ones, in "a project of religious and national renewal, the main features of which were the restoration of monarchy and the defense of Rome within a cultural framework of official piety", of which Sacré-Cœur is the chief lasting triumphalist monument.
The decree voting its construction as a "matter of public utility", 24 July, followed close on Thiers' resignation. The project was expressed by the Church as a National Vow (Voeu national) and financial support came from parishes throughout France. The dedicatory inscription records the Basilica as the accomplishment of a vow by Alexandre Legentil and Hubert Rohault de Fleury, ratified by Joseph-Hippolyte Guibert, Archbishop of Paris. The project took many years to complete.