In 1870 tensions between France and Prussia intensified over the attribution of the Spanish throne. One of the candidates for the resumption of this throne was none other than a cousin of the King of Prussia, Wilhelm I, an option that Napoleon III wanted to avoid at all costs.

The Emperor of the French decided to declare war on Prussia on July 19, 1870. But the difficult expedition to Mexico, which had been completed almost three years earlier, had weakened the French troops who were not ready for such a conflict. Moreover, Napoleon III did not receive the support of other European monarchs in this declaration of war in which he was considered the aggressor. Wilhelm I, on the other hand, received the support of several German states, including the south, despite the fact that they were independent of Prussia.

On September 1,1870, the French Imperial Army were crushed by the German army at the Battle of Sedan. The next morning Napoleon III capitulated and was taken prisoner, and he was sent to Germany (the castle of Wilhemhöhe in Kassel, in Westphalia) where he remained in captivity for several months.

When news of the defeat reached Paris on September 4, the Second Empire was declared overthrown, a Republic was proclaimed, and a provisional government was established while France was still at war with Germany. The siege of Paris began on September 19, and the capital finally fell a hundred days later, on January 28, 1871.

More Info: en.wikipedia.org