An Oceanside man who died of natural causes in September was elected to office in the coastal San Diego County city more than a month later, officials confirmed Wednesday.

Gary Ernst was elected to Oceanside City Treasurer by a six percent margin over challenger Nadine Scott. The election results are expected to be certified on December 7th by the city council.

Ernst died Sept. 23 which did not allow enough time to remove his name from the ballot.

With all precincts reporting, Ernst earned 17,659 votes.

City councilmembers can declare the seat vacant since the winner cannot physically take office, according to Oceanside’s City Attorney John Mullen. That will lead to either an appointment or a special election.

If city leaders choose to appoint someone for two years, the decision must be made within 60 days, Mullen said.

Scott told NBC 7 that she would like to be appointed to honor the 15,500 voters who cast their ballot for her.

She said she believes voters were not informed that Ernst was deceased prior to the election because some city leaders wanted to appoint another candidate after the election.