Afterwards he returned to the State senate for one term beginning May 28, 1823, before being elected as an Adams candidate to the Twentieth Congress to fill the vacancy caused by the resignation of Daniel Webster and then reelected as an Anti-Jacksonian to the Twenty-first Congress and served from July 23, 1827, to March 3, 1831. After a term filled by Nathan Appleton, he was elected as an Anti-Jacksonian to the Twenty-third Congress (March 4, 1833 - March 3, 1835). Afterward he served again a member of the State house of representatives in 1841 and resumed the practice of law.