As part of the Treaty of Guadalupe Hidalgo following the Mexican–American War, the Mexican government ceded 525000 sqmi ; 55% of its pre-war territory (excluding Texas) to the US in exchange for $15 million.