 Despite Adams's opposition, both houses of Congress approved the treaty, with most Democrats voting for annexation and most Whigs voting against it.Texas thus joined the United States as a slave state in 1845.Adams had served with James K. Polk in the House of Representatives, and Adams loathed the new president, seeing him as another expansionist, pro-slavery Southern Democrat.