The French Revolution began in 1789, and at its onset the Margraviate of Baden was united under Charles Frederick, but it did not form a compact territory. Its total area was only about 1,350 square miles (3,500 km2), consisting of a number of isolated districts lying on either bank of the upper Rhine. Charles Frederick endeavored to acquire the intervening stretches of land, so as to give territorial unity to his country. His opportunity to do so came during the French Revolutionary Wars. When war broke out between the French First Republic and the Holy Roman Empire in 1792, the Margraviate of Baden fought for the House of Habsburg. However, their country was devastated as a result, and in 1796 the Margrave was compelled to pay an indemnity and to cede his territories on the left bank of the Rhine to the French First Republic.