A special election was held in on July 23, 1827 to fill a vacancy caused by the resignation of Daniel Webster (A) on May 30, 1827 after being elected to the Senate.
Gorham took his seat on December 3, 1827.