Santa Anna was in exile in Cuba when the war began. He made a secret deal with U.S. President Polk, promising that if the U.S. permitted him to bypass their naval blockade and return to Mexico, he would work to end the war on terms favorable to the U.S.