In 1917, Germany invited Mexico to join WW1 by attacking the U.S to recover the lost territories of Texas, New Mexico, and Arizona.
The United States declared war on Germany on April 6, 1917, more than two years after World War I started. A ceasefire and Armistice was declared on November 11, 1918. Before entering the war, the U.S. had remained neutral, though it had been an important supplier to the United Kingdom, France, and the other Allied powers.
The U.S. made its major contributions in terms of supplies, raw material, and money, starting in 1917. American soldiers under General of the Armies John Pershing, Commander-in-Chief of the American Expeditionary Force (AEF), arrived at the rate of 10,000 men a day on the Western Front in the summer of 1918. During the war the U.S. mobilized over 4 million military personnel and suffered 110,000 deaths, including around 45,000 who died due to the 1918 Spanish influenza outbreak (30,000 before they even reached France). The war saw a dramatic expansion of the United States government in an effort to harness the war effort and a significant increase in the size of the U.S. Armed Forces.
In January 1917, Germany resumed unrestricted submarine warfare in hopes of forcing Britain to begin peace talks. The German Foreign minister, Arthur Zimmermann invited revolution-torn Mexico to join the war as Germany's ally against the United States if the United States declared war on Germany in the Zimmermann Telegram. In return, the Germans would send Mexico money and help it recover the territories of Texas, New Mexico and Arizona that Mexico lost during the Mexican–American War 70 years earlier. British intelligence intercepted the telegram and passed the information on to Washington. Wilson released the Zimmerman note to the public and Americans saw it as a casus belli—a cause for war.