Top daily fantasy sports companies FanDuel and DraftKings agreed to stop taking money in New York on Monday, amid a monthslong fight with the state's attorney general over whether the games are illegal gambling.

New York Attorney General Eric Schneiderman said the companies had agreed to immediately stop operating paid contests in the state and that an appeal of an injunction against the two companies would be heard in September.