It was, in effect, the capital of the German Empire during the two dynasties that succeeded the Carolingians and it was during this period that the trade fairs for which Frankfurt became famous began. In 1372, Frankfurt became an 'imperial city', directly ruled by the Holy Roman Emperor. Between 1562 and 1792, German emperors were elected and crowned in Frankfurt.
During the Napoleonic Wars, Frankfurt was occupied and attacked by French forces, although it remained a free city until the Holy Roman Empire collapsed in 1805 and it was absorbed into the confederation of the Rhine, becoming the capital of the Grand Duchy of Frankfurt in 1806. This change was short-lived and the Congress of Vienna in 1815 saw Frankfurt become part of the German Confederation as a free city. In 1866, during the Austrian-Prussian War, the city was annexed by the Kingdom of Prussia and joined to the districts of Cassel and Wiesbaden.
In 1870, the treaty that ended the war between France and Germany was signed in Frankfurt.
During the Second World War, the city did not fare well; it was almost entirely destroyed by Allied bombing raids and 5500 of it's citizens lost their lives. A few buildings of historical interest were reconstructed, but much of the town was rebuilt in a modern style.