A special election was held in August 24, 1801 to fill a vacancy caused by the resignation of Levi Lincoln Sr. (DR) on March 5, 1801, before the first session of Congress, upon being appointed U.S. Attorney General.
Massachusetts electoral law required a majority for election, which was not met on the June 22, 1801 first ballot, requiring a second election held on August 24.
Hastings took his seat on January 11, 1802.