During World War I, the German Empire was defeated by the Allied Powers, one of which was the United States. The U.S. government declared war on Germany on April 6, 1917. At the end of the war in November 1918, the German monarchy was overthrown and Germany was established as a republic.