BUFFALO, N.Y. (WIVB) – Mayor Byron Brown’s chances of appearing on the November ballot took two hits Thursday as both state and federal courts ruled in favor of Democratic primary winner India Walton.

A state appellate court unanimously overturned a previous ruling in favor of Brown on Thursday morning, one day before the Erie County Board of Election is set to finalize the ballots it will send out to military members.

Later Thursday, the 2nd Circuit of the U.S. Court of Appeals issued a stay in the federal case, nullifying the preliminary injunction issued by U.S. District Judge John L. Sinatra Jr. that ordered the Erie County Board of Elections to place Brown on the ballot.

Mayor Brown’s campaign is saying they’re disappointed by the federal and state court decisions. They add, “Write down Byron Brown.”

“We are disappointed by the decisions in federal and state court today. We believe that the initial rulings were correct and properly granted ballot access for the Mayoral election in the City of Buffalo,” Conor Hurley, Campaign Manager of Brown for Buffalo said in a statement. “Despite our disappointment, we respect the Court’s decisions and will not disparage or denigrate anyone involved in them, as our opponent and her supporters have done over the last two weeks. Our campaign remains focused on what has sustained us all along, which is ensuring that Buffalo’s progress continues, and that no matter what method people vote by, that they will have the ability to cast their vote for a qualified and experienced candidate. In November, Mayor Byron Brown will prevail. Write Down Byron Brown.”

The Walton campaign says they are thrilled with the court’s decision.

“We are thrilled that, immediately after the Fourth Department convincingly ruled in our favor on the merits of the case, the Second Circuit granted our motion to stay Judge Sinatra’s order,” Walton campaign spokesperson Jesse Myerson said in a statement. “As of now, Byron Brown’s frivolous legal actions have failed, and we are calling on him to cease them once and for all, and let us get back to the issues.”

Five judges of the Fourth Department of New York State Appellate Court heard oral arguments Thursday morning in Rochester in Walton’s appeal of a Sept. 3 ruling by State Supreme Court Justice Paul Wojtaszek. He ruled earlier this month in favor of Brown’s attempt to get his name on the ballot under the newly created “Buffalo Party,” despite the fact that the petition was filed after the May 25 deadline.

But the appellate court unanimously overturned that ruling Thursday.

“It is hereby ordered,” the appellate court wrote, “that the judgment so appealed from is unanimously reversed on the law without costs, the petition is dismissed, the declaration is vacated and the second decretal paragraph is vacated.” (You can view the full decision below.)

During Thursday’s hearing in Rochester, Sean Cooney, the attorney representing Walton argued that Brown should not be allowed on a minor party line after the May 25 deadline because he says Brown would have an unfair advantage by knowing the outcome of the primary election before proceeding with a minor party candidacy.

Brown, who is hoping to become the first mayor in Buffalo history to serve five terms, has continued to run as a write-in candidate since losing the primary election in June. He did not attempt to run on any other party line until submitting paperwork for the Buffalo Party in August — months after the May 25 deadline — hoping to get the recent change in the election calendar ruled unconstitutional.

The Erie County Board of Elections needs to send out military ballots for the Buffalo mayor’s race by Friday. Elections commissioners have scheduled a meeting for 2:30 p.m. Friday to finalize those ballots.

Latest news in the Buffalo mayoral election