Despite a long history of military confrontation between Mexico and the United States throughout the 19th century and the first half of the 20th century, Mexico initiated a policy of military cooperation with the United States when World War II broke out that prevailed throughout the early 1940s.