Shortly after Texas was annexed by the United States, a dispute broke out between the United States and Mexico over its boundaries. President James Polk used this dispute to--?

A) justify a war to extend the borders of the United States
B) invade Mexico in search of gold and silver
C) gain territory to build a railroad to the Pacific coast
D) acquire new territory to resettle the Mormons