After Napoleon III's declaration, the Germans mobilized quickly, and began winning battles in the first week of August, which forced the shocked French into retreat. On August 16, General Constantine von Alvensleben and his 30,000 German troops surprised Marshal Achille-François Bazaine and his 130,000 French troops near Mars-la-Tour. In the ensuing battle, each side lost about 16,000 men, but the Germans captured Vionville, blocking the western escape route of the French. Bazaine directed his men to a north-south line of hills near Gravelotte. The French were in a better position at the onset of the August 18 battle, causing the Germans to suffer 20,000 casualties to 13,000 for the French. However, the cautious Bazaine and his men retreated to the Metz fortress, where the Germans were able to contain them. The results of the Battles of Mars-la-Tour and Gravelotte opened the way for Moltke to win the crucial Battle of Sedan, forcing the surrender of 83,000 French troops on September 2, 1870.
In the wake of the humiliating French defeat at Sedan, Napoleon was taken prisoner by the Germans (and later exiled to England), a provisional government was established, and the Third French Republic was declared. On September 19, the Germans launched an attack on Paris. In reaction, the French initiated negotiations for ending the war, but the talks soon collapsed. Bazaine finally surrendered at Metz on October 27, and Paris fell on January 28, 1871, with an armistice signed the same day. The Treaty of Frankfort formally ended the war on May 10, 1871. The Franco-Prussian War produced several significant results: unification of northern and southern German states into the German Empire; the overthrow of Napoleon III and the establishment of the Third French Republic; the end of French dominance in Western Europe; greater German confidence in Prussian militarism; French resentment springing from the defeat and the annexation of Alsace-Lorraine into the German Empire; and, the annexation of the Papal States into a unified Italy, after French troops withdrew to fight in the war.