As an effect of the industrial revolution which began in England at the beginning of the 19th century, Switzerland's agrarian sector decreased in size and thus the industrial sector started to increase in size from the mid-19th century on.
In the 19th century and by the beginning of the 20th century Switzerland's industrial sector was the largest and Switzerland was the wealthiest country in Europe by a considerable margin.
In the 1910s, during World War I, Switzerland suffered an economic crisis. It was marked by a decrease in energy consumption, energy being mostly produced by coal in the 1910s, 1920s, 1930s and 1940s. The war tax[specify] was introduced. As imports were difficult, attempts were made to strengthen the Swiss economy. The cultivation of grain was promoted, and the Swiss railway became the first to use electric instead of coal-burning, steam-driven engines.
In the 1920s Switzerland's energy consumption increased.
Throughout the 1930s Switzerland's energy consumption stagnated.
In the 1940s, particularly during World War II the economy profited from the increased export and delivery of weapons to the German Reich. However, Switzerland's energy consumption decreased rapidly. The conduct of the banks cooperating with the Nazis and the commercial relations with the axis powers during the war became the subject of sharp criticism to such an extent, which even resulted in a short term international isolation of Switzerland from the world. After World War II, Switzerland's production facilities remained to a great extent undamaged which facilitated the country's swift economic resurgence.