C. the Mexican War
The Compromise of 1850 dealt with territory that the United States acquired as a result of the Mexican War (1846-1848). This conflict led to the U.S. gaining significant land in the West, prompting debates over the extension of slavery into these new territories, which the Compromise aimed to address.