On July 4, 1816, Representative Thomas Gholson, Jr. (DR) of Virginia's 18th district died in office. A special election was held to fill the resulting vacancy on October 10, 21-23, and 28, 1816 (each of the three districts within the 18th district held their election on a different day).
Election results
Nelson took his seat on December 4, 1816, at the start of the 2nd session of the 14th Congress.
References
Virginia's 18th congressional district special election, 1816 Wikipedia(Text) CC BY-SA