The correct answer is the Mexican-American War.
The Mexican-American War resulted in the United States gaining a significant amount of territory in what we now know today as the American Southwest. Thanks to the Mexican Cession, the United States gained California, Arizona, New Mexico, Utah, etc.
After gaining all of this territory, the issue then became whether or not slavery would exist in these territories. This is when David Wilmot introduced the Wilmot Provisio, in which he attempts to stop slavery from expanding into these territories.
However, this proviso is never passed. Instead, Congress passes the Compromise of 1850.