In 1914, Mexico was under the control of General
Victoriano Huerta, who had been assisted in gaining power by then-US President
William Howard Taft. However, when
Woodrow Wilson took office in 1913, the new U.S. policy was to not recognize governments (such as Huerta's) that did not support the liberties of their people. However, Wilson's policy stopped short of supporting actual war against Mexico.
On April 9, U.S. sailors from the USS Dolphin, stationed off Mexican waters near the port of Tampico, landed at the port. They were arrested and later released. According to the Mexican version of events, the soldiers had entered a restricted area, but were found to have done so accidentally. Elements in the U.S., however, considered it to be Mexican harassment of the U.S. Military.
The local Mexican military commander apologized verbally to Admiral Henry Mayo, in charge of the American naval squadron in question; however, Mayo, with the backing of President Wilson, declined the apology. He instead insisted that those responsible for the arrests be punished, and that the Mexican military on shore issue a 21 gun salute to the U.S. flag. The commander responded with a written apology, and General Huerta himself expressed his regret, but the U.S. demand for a salute to the flag was turned down.
On April 22, President Wilson received the backing of Congress for the use of military force to resolve the issue. He ordered the U.S. Navy to seize the port of Veracruz, which was preparing to receive a German ship loaded with ammunition intended for Huerta's troops. In response, Mexican congressmen criticized the U.S., and mobs burned the American flag and looted American businesses in Mexico. The U.S. occupation of Veracruz lasted until November 1914, and was a primary cause of Huerta's resignation in August of that year as his southern armies' supplies ran out.
The Tampico incident had later repercussions, however, stemming from the lingering U.S.-Mexican resentments. These were taken advantage of by Germany in January 1917 when the so-called Zimmermann Telegram intimated that a Mexican alliance with Germany against the U.S. would result in Mexico regaining territory taken from it by the U.S. in prior wars. British interception of Zimmermann's telegram was effectively the final justification President Wilson needed to request a declaration of war against Germany in April 1917.
Reference: Mexico, Jaime Suchlicki