DraftKings and FanDuel will stop running paid contests in New York amid an ongoing fight to operate in the key market.

New York Attorney General Eric Schneiderman has sought to shut down the companies' operations since last year, when he issued a cease-and-desist order, arguing their contests rely on chance and are illegal under state law. DraftKings and FanDuel have stressed their contests require skill, and they were previously allowed to operate while they appealed the injunction.

"As I've said from the start, my job is to enforce the law, and starting today, DraftKings and FanDuel will abide by it. Today's agreement also creates an expedited path to resolve this litigation should that law change or upon a decision by the appellate division," Schneiderman said in a statement.

Under the New York agreement, DraftKings and FanDuel will stop paid contests and delay an appeal until September. However, if state lawmakers pass legislation explicitly allowing and regulating paid daily fantasy sports, the state's gambling claims will end.

Andrew Harrer | Bloomberg | Getty Images

DraftKings and FanDuel displayed in different formats.

The New York legislature has floated bills to regulate the contests amid state lobbying efforts from the daily fantasy industry.

A spokesperson for New York-based FanDuel said stopping paid contests in its home state is "disheartening."

"We believe this is in the best interest of our company, the fantasy industry and our players while we continue to pursue legal clarity in New York," the spokesperson said.

In a statement, DraftKings said it would "continue to work with state lawmakers to enact fantasy sports legislation."

DraftKings and FanDuel offer popular contests where users pay an entry fee, choose a lineup of real athletes and potentially win cash based on the players' performances. As their profiles increased last year with strong private funding and advertising buys, they began to face legal challenges at the state level.

Daily fantasy sports operators have faced skepticism in Nevada and Texas, among other states.

Schneiderman said the agreement did not affect false advertising claims against DraftKings and FanDuel.