On May 4, 1841, a special election was held in Pennsylvania's 13th congressional district to fill a vacancy caused by the death of William S. Ramsey (D) on October 17, 1840, shortly after his re-election, and before the 26th Congress had ended.
Election results
Gustine took his seat on May 31, at the start of the 1st session of the 27th Congress.
References
Pennsylvania's 13th congressional district special election, 1841 Wikipedia(Text) CC BY-SA