Gary Ernst, who died of natural causes on September 23, is elected as treasurer for the city, official results show.

US voters in Oceanside city, California, have elected a dead man to office, according to official results.

Gary Ernst, who died of natural causes on September 23, was re-elected as treasurer for the city of Oceanside by earning 17,659 votes and beating challenger Nadine Scott by about six percentage points.

The city council did not remove Ernst’s name from the ballot after he died from diabetes complications.

The council said on Thursday that since Ernst could not take office, the seat would remain vacant until a decision is made on appointing someone to fill out the term or calling for a special election.

Although uncommon, this is not the first time American voters have cast their ballots for a deceased person.

In 2000, the state of Missouri famously elected Governor Mel Carnahan to the Senate – 38 days after he had been killed in a plane crash that also claimed the lives of his son and a campaign adviser.

Scott told San Diego’s KNSD-TV that she would like to be appointed to the post to honour the more than 15,000 people who voted for her.

She said she did not think that voters knew Ernst was dead.