Which of the following was immediate effect of the end of the Mexican-American War in 1848?

A- Spain sends resources to Mexico
B- the USA gains a lot of new territory
C- the USA surrenders to Mexico
D- Mexico and Spain rejoin forces