A few Mexicans returned to Mexico after the Mexican American War, but most did not.
According to the Treaty of Guadalupe Hidalgo in 1848, which ended the Mexican War, Mexicans had one year to decide whether to move across the border to Mexico or stay in what was now a foreign land. Because they regarded the land as theirs, all but 2,000 decided to stay.
Those who stayed were guaranteed the rights of U.S. citizens, including the right to own property and to enjoy equal protection of the law. These rights would soon be violated.