Scarborough Downs plans to close its horse barn by the end of this month, citing an ongoing problem with water contamination caused by horse manure.

Mike Sweeney, spokesman for the harness racing facility, said Thursday that an analysis by the Environmental Protection Agency showed “there was some seepage of nutrients from the manure into the groundwater in the area. We obviously do not want to be in non-compliance of EPA regulations.”

The extent of the contamination, and whether it might affect neighboring properties, was not clear Thursday.

Scarborough Town Manager Tom Hall was not aware of any complaints from neighbors and said that the environmental analysis “was nothing initiated by the town.” He added that EPA could have acted on its own without notifying the town.

Dave Deegan of the EPA’s New England Regional Office said he was “not certain at this point what role (if any) EPA has played.”

Sweeney said the barn closure would not affect the track’s fall racing schedule, which starts Oct. 14 and continues each Friday, Saturday and Sunday through Dec. 4. Horses will be brought in on the day of their races and then returned to their home stables.

Sweeney said horses have been stabled at Scarborough Downs since 1950. As recently as five years ago, about 400 horses were stabled there, but that number has dwindled to about 50.

“This was not a decision we took lightly,” he said. “But with the economic reality and the problems the track has had financially, we’re not able to correct the problem. The only option available to us was the hard decision to close the barn area.”

Scarborough Downs offers simulcast wagering seven days a week, but has seen a sharp decline in revenue for many years. From 2002 to 2011, the amount wagered at the track dropped by 40 percent, from $2.6 million to $1.6 million. Sweeney said the track’s revenue has decreased by another 50 percent since the opening of the Oxford Casino in 2012.

Plans to close the barn appear to have created friction between the track and those who stable horses there.

In a letter sent this week, the track told trainers and other stall-renters that the barn might remain open beyond October should they come up with a solution to the contamination and its cleanup.

“Hopefully the horsemen got that message,” said Ed MacColl, attorney for Scarborough Downs. “It’s not a matter of ‘You can’t have horses on the property.’ It’s more like, ‘You can’t have horses on the property unless you have a plan and comply with the plan.’ If you want to keep the barn open, we need the folks using the barn to contribute to the solution.”

Linwood Higgins, a Scarborough resident and consultant to the Maine Harness Horsemen’s Association, said “it seems disingenuous to blame the horsemen.

“This is an issue that’s been going on for quite a while,” he said. “The reality is that it’s (the track’s) property. They should have been maintaining it and enforcing any rules.”

The track’s property has been listed for sale for several years, Sweeney said, but both he and MacColl said there is no impending sale.

“It’s a hugely important piece of land in our town,” Hall said. “It’s in the geographic heart of our community and it holds such promise in terms of its potential: 400-plus acres with 250 of that highly developable … so we’re intensely interested in what goes on there.”