A judge on Thursday dismissed charges against an anti-war protester who was struck and pepper-sprayed in a confrontation with Niagara Frontier Transportation Authority police last year outside M&T Bank headquarters on Main Street.

City Judge Joseph A. Fiorella said an NFTA officer “did engage in improper conduct which is repugnant to this court’s sense of justice.”

Nathaniel J. Buckley of Buffalo was arrested during the demonstration in April 2011.

“The defendant’s goal that day was to exercise his First Amendment right to free speech,” Fiorella said. “He had committed no crime.”

“Twenty months later, some justice,” said Buckley, 27, after learning about the ruling. “I’m glad the judge made that decision,” he added. “I thought it was intelligent and strong and in favor of First Amendment rights.”

Attorney Michael Kuzma, who, with Daire B. Irwin, represented Buckley, said the decision sends a message to those wishing to exercise their rights and also to law enforcement officers.

“It’s a big win,” Kuzma said. “It protects an individual’s First Amendment rights.”

As for the police, “I hope it sends a message they should not be so quick to pull out their Tasers and pepper spray and learn to respect the rights of residents of this region,” Kuzma said.

Fiorella dismissed misdemeanor charges of trespassing, resisting arrest and obstructing governmental administration.

The judge’s 11-page decision, however, mixed up which officer struck and pepper-sprayed Buckley.

Fiorella wrote that NFTA Officer Richard Russo engaged in “improper conduct,” and the judge did not name any other officer in the decision. Buckley, who testified in an earlier trial that Russo never spoke directly to him, has said NFTA Officer Adam Brodsky struck him and pepper sprayed him.

“That’s a mistake,” Buckley said of the judge’s description of Russo’s actions.

“Russo escalated things. But Russo just grabbed me,” Buckley said. “Brodsky did the tackling, clubbing and macing.”

Fiorella, when contacted by telephone by The News, declined to clarify his written decision regarding Russo’s actions.

Brodsky’s spraying of Buckley during a charged moment at the anti-war rally has been widely viewed on YouTube.

In the video, Buckley, 25 at the time, appears to be cooperating with NFTA officers when Brodsky reaches for the pepper spray from his belt and sprays him in the face, further inciting the crowd.

The officer’s “motive clearly could not have been to prevent further crime or protect the populace since defendant Buckley had left the private property and moved onto a public sidewalk free of pedestrians,” Fiorella wrote in his decision.

NFTA spokesman C. Douglas Hartmayer issued a statement: “Based on the fact there is a possibility of subsequent litigation involving this matter, it’s not prudent for the NFTA to comment on the case or the judge’s decision at this time.”

But he added, “I would suggest to you the Niagara Frontier Transportation Authority police department is comprised of dedicated officers, who have exhibited through their daily actions the willingness to place their lives in harm’s way every day to protect the traveling public and our community in general.”

Buckley’s first trial ended in a mistrial in June, after a juror passed a note to Fiorella seeking leniency for a sibling whose case was before the judge.

After that, Buckley’s lawyers produced documents they say show the Fountain Plaza area, where the incident occurred, is public in nature.

Public funds, planning and approvals led to the property’s development, Kuzma said.

Prosecutor Susan H. Sadinsky had opposed the dismissal motion at a hearing in September, saying Buckley’s First Amendment rights do not usurp the rights of private property owners.

M&T officials simply wanted the protesters off a retaining wall on the bank’s property, she said.

Fiorella noted that the open-air area is designed for the public’s use for numerous year-round activities. No enclosures prevent public access. The area is not posted as private property, he said.

The bank’s deed was the only document put into evidence by the prosecution to support its contention the area is private property belonging to the bank, but nothing on the deed substantiated that claim, the judge said.

For more than 30 years, the public has used Fountain Plaza with no limits, nor has the bank asserted its claim that the area is private property. The prosecution failed to establish beyond a reasonable doubt the property was private, Fiorella said.

As a result, Fiorella found two of Buckley’s co-defendants, Jason A. Wilson and Elliot Zyglis, not guilty of trespassing during their nonjury trial before him in June.

“It would be a travesty of justice to find that the same proof would have been sufficient to convict Buckley,” Fiorella said in his decision.

The judge noted in the decision that “the court is troubled by the actions of the NFTA.”

Surveillance video shows that on the day of the protest, some protesters went onto the ledge of a retaining wall on bank property, Sadinsky said at the earlier trial. The first of four NFTA officers arrived about 20 minutes later and encountered an estimated 50 protesters.

In his decision, Fiorella described what he saw on the video.

“The bank’s surveillance video shows that (the NFTA officer) followed the defendant onto the public sidewalk, grabbed the defendant, and when he struggled, (the officer) hit the defendant with his night stick,” the judge wrote. “Even though the defendant had been subdued against the wall and had stopped struggling, (the officer) pepper sprayed the defendant in the face.”

Hartmayer has previously said the NFTA did a confidential review of Brodsky’s use of force and that he was cleared of wrongdoing.

Sadinsky has said Buckley interfered with an officer’s attempt to arrest another protester when he and the two others were arrested April 8, 2011.

Buckley does not see it that way.

“We got off the wall. It was only after that things escalated,” Buckley said. “I never got violent. I was never harmful to anybody. I was the victim of brutality.

“I wish the conflict wouldn’t have happened that way,” he said. “But I don’t feel responsible for creating that conflict. I’m glad there’s some closure to it.”