A McDonough County judge ruled Friday that Steven Wailand will be seated as a city councilman.
The Western Illinois University student received 17 votes compared to his challenger's 16 votes in February's election for second ward alderman.
However, city and county officials didn't declared Wailand the winner.
Election Judges said city code required the candidate to win using a "50 percent plus one" rule.
Wailand and the Liberty Justice Center sued the city.
The results of a runoff election held earlier this month will remained sealed since the judge accepted the results of the initial February election.