In June 1919, Germany signed the Treaty of Versailles formally ending World War I. But in March 1935, Adolf Hitler repudiated the treaty and geared up for war. In October 1938, Hitler invaded Czechoslovakia, and France broke its promise to protect that country. France then signed a friendship pact with Germany in December 1938, but had to surrender in 1940 when Germany attacked. Germany signed peace treaties with Denmark, Estonia, and Latvia in 1939, only to begin invading those countries later that same year.