He was elected to the House of Representatives of the last Royal .Assembly of New Hampshire and then to the second Continental Congress in 1775, and was a member of the first Naval Committee of the latter, but he resigned in 1776, and in June 1776 became Congress's agent of prizes in New Hampshire and in 1778 continental (naval) agent of Congress in this state, where he supervised the building of John Paul Jones's "Ranger" (completed in June 1777), the "America," launched in 1782, and other vessels.