A North Dakota state legislative candidate whose name was left on the ballot even after he died from the coronavirus in October was elected Tuesday. 

North Dakotans elected Republicans David Andahl and Dave Nehring to represent the 8th district in the state’s House of Representatives.

NORTH DAKOTA CANDIDATE WHO DIED OF COVID-19 WILL REMAIN ON BALLOT

However, weeks before polls closed, Andahl, 55, had succumbed to the highly contagious virus that has infected more than 9.3 million people nationwide. 

Despite being "very careful” about the pandemic, Andahl died on Oct. 5 from virus-related complications after being hospitalized, his mother told The Bismarck Tribune at the time. 

North Dakota state legislative candidate David Andahl (David Andahl/FB)

The politician, who defeated Rep. Jeff Delzer, the longtime incumbent and target of Gov. Doug Burgum, during the June primary, had died after being sick for about four days, his mother said. 

After his death, state Attorney General Wayne Stenehjem affirmed that his name would still remain on the ballot, and if he won, the state Republican Party would appoint a replacement.

"In the event the deceased candidate receives the majority of the votes, the candidate is elected. However, if the prevailing candidate has died, the candidate is no longer qualified, and a vacancy would exist," Stenehjem wrote, citing state law on filling a legislative vacancy.

Although, voters have the option to petition for a special election after the legislative session if they are unhappy with the appointment. 

Earlier this year, Andahl and fellow District 8 House candidate Nehring won the Republicans' endorsements and voters’ nominations to defeat one of North Dakota’s most powerful lawmakers, Delzer, chairman of the House Appropriations Committee.

CORONAVIRUS CASES IN NORTH DAKOTA REACH RECORD HIGH

“He had a lot of feelings for his county ... and wanting to make things better, and his heart was in farming. He wanted things better for farmers and the coal industry,” his mother told the outlet. 

The number of confirmed, active cases in the state has surged in recent weeks, notching its highest level Monday.

The day before results were final, North Dakota reported 8,440 active cases of COVID-19, the highest amount since the state began tracking cases in March. 

FOX News' Madeline Farber, Vandana Rambaran and the Associated Press contributed to this report. 

CLICK HERE TO GET THE FOX NEWS APP