Germany's resumption of submarine attacks on passenger and merchant ships in 1917 motivated President Wilson to lead the United States into World War I. Following the sinking of an unarmed French boat, the Sussex, in 1916, Wilson had threatened to sever diplomatic relations with Germany, unless the German Government refrained from attacking all passenger ships, and allowed the crews of enemy merchant vessels to escape from their ships prior to any attack. The Germans had accepted these terms.
Germany's Chancellor believed that resuming submarine warfare would draw the United States into the war on behalf of the Allies and lead to the defeat of Germany. Despite his warnings, the German Government decided to resume unrestricted submarine attacks on all Allied and neutral shipping within prescribed war zones. On January 31, 1917, the German Ambassador to the United States presented U.S. Secretary of State with a note declaring Germany's intention to resume attacks the following day.
President Wilson severed diplomatic relations with Germany. Throughout February and March 1917, German submarines targeted and sunk several American ships, and many American passengers and seamen died.
Then the issue arose of Germany's attempts to build a secret alliance with Mexico. On January 19, 1917, British naval intelligence intercepted a telegram sent by German Foreign Minister Arthur Zimmerman to the German Ambassador in Mexico City. The "Zimmerman Telegram" promised the Mexican Government that Germany would help Mexico recover the territory it had ceded to the United States following the Mexican-American War. In return, the Germans asked for Mexican support in the war.
At first the British had not shared the Zimmerman Telegram with U.S. officials, because they did not want the Germans to know that British code breakers had cracked the German code. Then the British decided to use the telegram to help convince America to join the war. The British finally forwarded it to Wilson on February 24.
The submarine attacks on American merchant and passenger ships and the "Zimmerman Telegram's" implied threat of a German attack on the United States together changed American public opinion to support a declaration of war. Furthermore, international law stipulated that the placing of U.S. naval personnel on civilian ships to protect them from German submarines already constituted an act of war against Germany. Finally, the Germans had demonstrated that they had no interest in seeking an end to the conflict. These causes all led President Wilson to ask Congress for a declaration of war. Congress formally declare war on Germany.
Source: American Entry into World War I, 1917
U.S. State Department, Public domain