In Washington, Polk realized by early May that a compromise solution to the Oregon controversy was imminent and that when it occurred, it would hurt him with northern Democratic expansionists. A war with Mexico would help keep his party united on the basis of patriotism, but the war needed to come first, before the Oregon settlement.