The Battle of Cinco de Mayo (May 5, 1862) was fought between Mexico and France.
It was not a battle against the United States, Spain, or any other nation. The conflict arose because Mexican President Benito Juárez suspended foreign debt payments. France, under Napoleon III, saw an opportunity to establish a client monarchy in Mexico (eventually installing Maximilian I). A poorly equipped Mexican force under General Ignacio Zaragoza defeated the larger, better-armed French army at Puebla—a symbolic victory celebrated as Cinco de Mayo.
France withdrew in 1867 after U.S. pressure (post-Civil War) and Mexican guerrilla resistance.