Suffolk Downs, a horse-racing track in Massachusetts, has filed a federal breach of contract lawsuit against Scarborough Downs, alleging that it failed to pay nearly $180,000 in simulcast bets placed at the Maine track for races held elsewhere.

Scarborough Downs entered a contract with Suffolk Downs, located in East Boston, in 2012 so that bettors at the two tracks could make wagers remotely on horse races. The agreement specified how the tracks would share profits from customers who lost their wagers, according to the lawsuit.

Suffolk Downs closed last year, but continues to function as a broker, managing simulcast payments for Scarborough Downs to other tracks and vice versa.

Suffolk Downs filed the lawsuit in U.S. District Court in Portland on Monday under its business name, Sterling Suffolk Racecourse LLC, against Scarborough Downs’ corporate parent, Davric Maine Corp., demanding nearly $157,500 for bets made at the Maine track as well as an assortment of fees and commissions for a combined total of $179,374.

Attorney Edward MacColl, who represents Scarborough Downs, said the Maine track owes Suffolk Downs some money but disputes it owes that much.

“They serve as a clearinghouse on debts to other tracks,” MacColl said of Suffolk Downs. “They say other tracks got paid, but we need proof of that.”

The lawsuit against Scarborough Downs comes just weeks before it is scheduled to resume live harness racing at its Payne Road location on March 28.

An attorney for Suffolk Downs, Jonathan Goldberg of the Portland law firm Mittel Asen, said the Massachusetts company isn’t alleging that Scarborough Downs willfully refused to pay the money as required, but just failed to pay.

“It’s a simple breach of contract action. I wouldn’t venture a guess why they haven’t paid. I have no idea,” Goldberg said. “It will continue through the court process. And if we can negotiate a solution, we will, but if not, we will continue through the court.”

Suffolk Downs alleges in the lawsuit that it sent a letter demanding payment in full to the general manager of Scarborough Downs on Nov. 24, 2014, but has not yet received the money.

Scarborough Downs, founded in 1950, has seen a sharp decline in the money being gambled in recent years. From 2002 to 2011, total wagers dropped by 40 percent, from $2.6 million to $1.6 million, according to a 2011 Portland Press Herald story. Scarborough Downs hasn’t kept attendance figures since it stopped charging for admission in 2002.

MacColl said he didn’t have more recent figures immediately available, but acknowledged that wagers at the Scarborough track have continued to decline since 2011.

“It’s an uphill battle,” MacColl said. “They are tightening their belt to continue to stay in business. I think they will continue to stay in business this season just fine.”

MacColl said Maine law has put Scarborough Downs at a distinct disadvantage to racinos, which offer live horse racing and other forms of gambling, such as slot machines. The opening of the Oxford Casino in Oxford in 2012, with slot machines and gaming tables, delivered another significant blow to Scarborough Downs’ profits.

“The law is incredibly unfair to the Downs. It has to compete with full-scale casinos,” MacColl said.