The border is not a straight line because it traces the Colorado River. The 1848 Treaty of Guadalupe Hidalgo, which ended the Mexican‑American War, designated the river as the boundary. The river's natural meanders create the irregular border; its course has shifted over time, occasionally sparking disputes resolved through negotiation.