Denmark was brought into the Napoleonic Wars on the French side when attacked by Britain at the Battles of Copenhagen in 1801 and 1807. The eventual defeat of Napoleon led to the break-up of the Denmark-Norway union. The next major combats were over control of Schleswig, in the First and Second Schleswig Wars. Denmark remained neutral in World War I, but in World War II the country was occupied, with little fighting, by Nazi Germany in 1940.