William Huntress’ combative approach to fighting federal environmental officials is paying dividends – an end to the criminal charges against the Amherst developer.

The government’s prosecution of Huntress and his two companies fell apart Monday when a federal judge decided that prosecutors interfered with the grand jury that indicted them in late 2011.

Chief U.S. District Judge William M. Skretny dismissed the seven-count indictment against Huntress after finding statements by the prosecution might have improperly influenced the grand jury’s decision to indict him.

“Everyone is entitled to a fair and impartial presentation to the grand jury,” Paul J. Cambria Jr., Huntress’ criminal defense lawyer, said of Skretny’s rationale in dismissing the indictment.

The judge’s ruling means the criminal aspect of the government’s case against Huntress – it also has a civil suit pending against him – is dead unless it appeals the decision or tries to re-indict him.

The indictment centers around Huntress, who has a reputation for butting heads with residents and public officials, and his development of a 97-acre parcel of land at 10880 Transit Road in Amherst.

Prosecutors claim Huntress cleared the site in 2008 and, among others things, illegally filled in wetlands and removed trees.

Huntress has countered with his own lawsuit challenging the U.S. Environmental Protection Agency and what Cambria called its “overzealous” handling of Huntress’ case.

“Our contention is the government never had jurisdiction over that land,” Cambria said. He insists the land was once used for farming and therefore cannot be designated as a federal wetland.

He also insists the jurisdiction issue is at the center of both the civil and criminal cases filed by and against Huntress.

The government’s 2011 indictment of Huntress and his companies centered around allegations of criminal contempt, making false statements and concealing facts.

Prosecutors maintain Huntress knew the Transit Road land was a wetlands site when he bought it in 2006 and proceeded with plans to clear it for development.

The government also claims he built a 25-foot-wide gravel road at the site and arranged for 200 truckloads of fill to be dumped on the wetlands portion of it.

In dismissing the charges, Skretny adopted the recommendations of U.S. Magistrate Judge Jeremiah J. McCarthy, who found reason to believe the grand jury’s independence might have been compromised in the Huntress case.

Skretny, like McCarthy, pointed to the prosecution’s questioning of a federal environmental official during the grand jury proceedings and its reference to an earlier court ruling that found “probable cause to believe that crimes had been committed.”

U.S. Attorney William J. Hochul Jr. declined to comment on Skretny’s ruling.

Unlike most defendants in criminal prosecutions, Huntress has taken the offensive in publicly criticizing the EPA investigation of his companies.

In his civil suit, he accused the agency of a “vindictive, spurious, retaliatory and overzealous prosecution” and asked the court for $65 million in damages.