BANGOR, Maine — A federal judge has ruled against a former dairy farmer, whose Dixmont operation was deemed one of the worst in the state, and in favor of the ex-state agriculture commissioner in a civil lawsuit, according to information filed on the court’s electronic case filing system.

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

U.S. District Judge Jon Levy rejected McCue’s claims in an order dated July 30 after hearing arguments on Bradstreet’s motion for summary judgment in federal court in Portland the previous month. A judgment in Bradstreet’s favor also was filed July 30.

In March 2012, McCue sued Bradstreet, who served as commissioner from 2006 to early 2012 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 to be an aggressive crackdown in 2006 over manure disposal, according to court documents.

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

Bradstreet claimed that 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 that he recused himself from any involvement from the case because McCue rented land from Bradstreet.

In July 2007, U.S. District Court Judge John Woodcock found McCue in contempt of a court-approved consent agreement with the U.S. Environmental Protection Agency that requires seven actions to clean up waste water and manure that has been allowed to flow into the stream.

“Mr. McCue had a long history of disregarding environmental laws on his 500-cow dairy farm, including repeated discharges of large quantities of manure into a nearby stream and wetlands,” Assistant Attorney General Christopher Tuab, who represented Bradstreet, said Friday in an email. “We are pleased that the court recognized that it was Mr. McCue’s own conduct that led to enforcement actions by not only Maine’s Department of Agriculture and Department of Environmental Protection, but also the federal Environmental Protection Agency and Department of Justice.”

Efforts to reach McCue’s attorney, David Webbert of Augusta, were unsuccessful Friday morning.

McCue could appeal Levy’s decision to the 1st U.S. Circuit Court of Appeals in Boston.