It was caused by a border dispute. Mexico never recognized Texas independence. They claimed that the Rio Grande was still part of Mexico. This further aggravated when President Polk sent troops to the Nueces River as the expedition to California by John Fremont.