Voters in his home state wrote in Sanders over 18,000 times, according to state election results.

He received about 6% of the Vermont vote, ahead of third party candidates Gary Johnson and Jill Stein, who combined for 5% of the vote.

Sanders, who served as Burlington’s mayor and has represented Vermont in Congress since 1991, still trailed Clinton and Donald Trump. Clinton, who Sanders later endorsed, received 55% of the vote. Trump received about 30%.