A State Supreme Court Justice is ordering the Erie County Board of Elections to certify State Senator Tim Kennedy as the winner of his primary against Betty Jean Grant.
Lawyers for both candidates were in court Friday.
Grant, chair of the Erie County Legislature, has challenged the results showing Kennedy with a slight lead, arguing some voters went to the wrong polling place.
Kennedy released a statement saying the Supreme Court review is complete and that he is the winner.
"We're thrilled the State Supreme Court completed its comprehensive review and has ruled it is finally time to certify our victory," Kennedy said.
A timely certification is necessary as military ballots are due to be printed and sent out in the coming days.
"Any further delays could potentially deny local military personnel their right to cast a vote in the upcoming presidential election," Kennedy added.