BANGOR, Maine — A lawsuit filed against a former Maine commissioner of agriculture by a former dairy farmer whose Dixmont operation was deemed one of the worst in the state has been settled for $40,000 in favor of the plaintiff, according to attorneys.

Plaintiff Carl D. McCue of Hampden alleged Seth Bradstreet, when he was head of what was then the Maine Department of Agriculture, Food and Rural Resources, drove McCue out of business in 2007 in retaliation for a disagreement the men had in 2004 and 2005 over federal crop subsidies.

In June 2012, McCue sued Bradstreet, who served as commissioner from 2006 until early 2011 under Gov. John Baldacci, in U.S. District Court in Bangor. The former owner of Country Acres Farm, located on Route 7 in Dixmont, claimed Bradstreet influenced state regulators in what McCue considered an aggressive crackdown in 2006 over manure disposal, according to court documents.

McCue also claimed that when he finally received secured financing to clean up the farm and nearby stream in late 2006, state regulators stripped him of his livestock permit and denied his application to spread manure during the winter.

Bradstreet claimed McCue’s business went under after the federal Environmental Protection Agency, which found the farmer repeatedly discharging manure into nearby Martin Stream, took the unprecedented step of suing Country Acres to force compliance with the Clean Water Act. The former commissioner also maintained he recused himself from any involvement from the case because McCue rented land from Bradstreet.

In July 2014, U.S. District Judge Jon Levy rejected McCue’s claims after hearing arguments on Bradstreet’s motion for summary judgment in federal court in Portland the month before.

McCue’s attorney, David Webbert of Augusta, appealed that decision to the 1st U.S. Circuit Court of Appeals in Boston. In July 2015, a three-judge panel upheld all but one portion of the decision and sent the case back to Levy to determine what if any damages McCue may be entitled to if a jury were to find in his favor.

The settlement was reached Oct. 7 during a conference with U.S. District Judge George Singal, according to the court’s electronic case filing system. The judge dismissed the case on Nov. 3.

“The parties reached an amicable resolution of the case and greatly appreciate the invaluable assistance of Judge Singal,” Webbert and Assistant Attorney General Christopher Taub said in a joint statement issued Monday.