NEW YORK — Prosecutors said Tuesday they decided to drop criminal charges against a Wall Street executive after a judge rejected most of the evidence in the fraud case, finding it was seized improperly.

In a filing in Manhattan federal court, the prosecutors said they had based charges brought against financier Benjamin Wey in 2015 largely on evidence seized from his home and business.

Wey, CEO of New York Global Group, said in a statement that he was wrongly charged and was grateful justice was served.

“The government’s case was built on fabricated allegations and false statements that grossly misled federal authorities. This ordeal devastated our employees and our families, has done irreparable harm to our lives and closed our prospering businesses,” Wey said. “We are thankful that this judgment will help clear my name.”

Prosecutors had said Wey made tens of millions of dollars illegally by manipulating the stock prices of companies he gained a secret financial interest in.

His trial had been scheduled for October.

U.S. District Judge Alison J. Nathan in June disqualified the bulk of evidence seized from Wey’s home and business. She said the government was “grossly negligent” in conducting sweepingly broad searches.

She said the “over-seizure was not the result of expediency, mistake, or even simple negligence” but seemed instead to be a conscious effort to let investigators keep materials that were not subject to the search.

The judge had noted that government witnesses at a hearing struggled to explain why items seized included children’s school records, medical prescriptions, divorce records and decade-old clippings from the sports section of a college newspaper.

David Siegal, Wey’s lawyer, said the case “should serve as a powerful reminder for years to come that the government must adhere to fundamental safeguards of our privacy and liberty when conducting searches.”

Wey was subject to electronic monitoring after his arrest on conspiracy, wire fraud and securities fraud charges. Wey planned to have his electronic ankle bracelet removed Wednesday.

Last year, a judge reduced from $18 million to $5.6 million the damages awarded to a Swedish woman who had sued Wey for sexual harassment. A jury had ruled in favor of Hanna Bouveng’s claims that Wey coerced her into sexual encounters and fired her after learning she had a boyfriend. She said Wey launched a smear campaign against her.