On March 18th 1871, the revolutionary, anti-religious, and radical socialist communards of Paris refused to accept the authority of the the French government, and for two months ruled the city in the name of the people.
The background to the uprising was the defeat of the French in its war against Prussia, the capture of Emperor Napoleon III, and a two month siege of the capital by the Prussians. During the siege, the city was defended by the local National Guard (not the regular Army). In February of 1871, the new French government signed an armistice with the Germans. In March, the French government attempted to take into their control the cannons that had defended Paris; they were rebuffed by local militia and the revolution began.
After a hastily arranged campaign, a governing Commune was elected on 27th March with a heavily-radical majority. The next day, in their first acts, the Communards abolished military conscription and the death penalty, and adopted the red flag rather than the tricolour. Over the following weeks, they imposed a policy of church and state separation, elimination of rents during the siege, and the right of employees to take over a business if the owners had fled. Canteens and orphanages were established throughout the city.
By March 20th the Thiers government at Versailles had raised enough troops (mainly returned prisoners of war) to start skirmishing with Commune forces on the outskirts of Paris. At the end of the month, the Commune decided to take the fight to Versailles, but their advance was quickly overwhelmed by French Army forces.
During April, the French forces pressed their attacks on Paris. The Commune established a Committee of Public Safety (the same project as operated the Reign of Terror in the 1790s) and arrests of suspected French allies began.
The final assault on the Commune by the forces of reaction began late in May. 60,000 government forces found a way inside the city and neighbourhood by neighbourhood they destroyed the communards. The National Guard had not expected the government forces to be able to enter the city and few barricades had been erected inside. The National Guard was greatly outnumbered and out-gunned by the government Army, and soon mass executions of Guard prisoners were taking place.
After a week of vicious street fighting, executions and counter-executions, the cemetery of Pere Lachese was the final holdout for the Commune. After a fight that lasted all day, the last 150 National Guard surrendered and were executed.
In the end, there were 7,300 casualties on the French Army side (of whom about 900 were killed), while the number of Commune defenders killed reached perhaps 10,000.
Anarchists played a large part in the activities of the Commune, and the subsequent death and imprisonment of anarchist leadership strongly affected the growth of the movement for decades thereafter. Marx, Lenin, Engels, Bakunin and others wrote about the Commune as the first great proletariat revolution.
The Paris Commune has been the inspiration for any number of later similar events, in Moscow, Petrograd, Shanghai, and elsewhere. The early Soviets adopted the red flag and called their Ministers Commissars in direct tribute to the events in Paris.