American forces maintained an occupation of the state capital for the rest of the Mexican–American War.