A man who died of natural causes in September was elected to public office in Oceanside, Calif., this week, according to local reports.

Gary Ernst was elected Oceanside City Treasurer over challenger Nadine Scott, who is a living opponent, NBC 7 San Diego reported.

Ernst passed away on Sept. 23, and officials didn't remove his name from the ballot.

Oceanside’s City Attorney John Mullen told NBC 7 that council members can declare the seat vacant since Ernst is not able to fill the position.

Mullen told NBC 7 that someone will be appointed to the position or a special election will be held.

Scott said she believes voters were not aware that Ernst was no longer living when they voted, and she would like to be appointed to the position, NBC 7 reports.

Follow Mary Bowerman on Twitter: @marybowerman