Leading daily fantasy sports operators DraftKings and FanDuel are suspending contests on college sports indefinitely in all states as part of a deal with the NCAA, company officials told ESPN on Thursday.

The voluntary decision by DraftKings and FanDuel comes after months of discussions between the daily fantasy sites, the NCAA, member institutions and various state legislatures.

"We appreciate and commend DraftKings and FanDuel's action to stop offering contests involving college, high school and youth sports," NCAA president Mark Emmert said in a statement issued Thursday. "This action culminates months of hard work between all parties to reach a place that is good for amateur sports and most importantly, the young people who participate. We will work diligently with our member schools over the coming year to ensure such amateur sports 'carve outs' are included in pending states' legislation."

All college contests will end after this week's college basketball games. The NCAA men's basketball tournament, the last significant college event for daily fantasy prior to football season, concludes with Monday's championship game.

Neither FanDuel nor DraftKings have offered contests involving high school or youth sports.

AP Photo/Stephan Savoia

"[F]anDuel has had months of productive conversations with the NCAA, their member institutions and various state legislators to better understand their concerns around fantasy sports contests based on amateur athletics," a company spokesperson said in a statement to ESPN. "It is clear that this is an issue that matters to a variety of constituencies and we feel that the best path forward is to suspend offering these contests pending resolution on the issue within state legislatures." DraftKings, in a statement, also acknowledged the productive dialogue with the NCAA and said it feels suspending contests on college sports is the "best path forward for the industry at this time."

"We continue to see tremendous support for fantasy sports in legislatures across the country, with nearly 30 states advancing thoughtful and appropriate regulations for fantasy play," DraftKings said in its statement. "[W]e will work closely with the NCAA and lawmakers on a carve-out for collegiate sports in any proposed regulatory framework moving forward. DraftKings is committed to ensuring that fantasy sports players are able to continue to play these skill-based contests that bring them closer to the sports that they love."

College sports, both football and basketball, represent only 3 percent of FanDuel's revenue. At DraftKings, the NFL daily fantasy market is 10 to 20 times larger than the college football market.

The decision to suspend college offerings comes while the industry is fighting legal battles in several states and lobbying in others to get legislation passed, clarifying fantasy sports' legality. More than 30 states have introduced fantasy sports legislation this year. Only five of the states, though, are considering bills that include a prohibition on college sports. Indiana and Massachusetts have banned daily fantasy contests on amateur sports in new regulations. Virginia's new daily fantasy law, however, does not include a prohibition on amateur sports.

"The future of fantasy sports will be defined in those state governments, where leaders are hearing a resounding call from their constituents who want to continue to play the games they love," the FanDuel spokesperson added. "The action we are seeing in states across the country makes it clear: the future is bright for the millions and millions of people who play fantasy sports."

In New York, where the sites recently stopped offering paid contests amid a tense legal fight with Attorney General Eric Schneiderman, several daily fantasy bills already have been introduced. New York Assemblyman J. Gary Pretlow is in the process of writing a daily fantasy bill that is expected to be introduced during this legislative session, which runs into mid-June. Pretlow's bill will specify daily fantasy is limited to professional sports only. He said prohibiting daily fantasy for amateur sports helps with the bill's perception.

The NCAA has been one of daily fantasy's most ardent opponents. It considers fantasy sports a form of sports wagering, something the association defines as any activity during which "something is put at risk -- such as an entry fee -- with the opportunity to win something in return." Daily fantasy proponents argue that they offer a game of skill, not a form of gambling.

The NCAA has not taken a legal position on fantasy sports, but is opposed to all forms of sports betting, legal or illegal. It is concerned about student-athletes being put in positions where they could be vulnerable to being compromised. The NCAA fears scenarios in which classmates ask for details about a team or player and share and/or use the inside information to aid their fantasy teams.

"We have made clear at every point in this national debate that daily fantasy sports competition should not be allowed to be conducted using college, high school and youth sports programs." Donald Remy, NCAA chief legal officer, told ESPN in a statement.

In October, as the controversy surrounding the daily fantasy industry escalated, the NCAA notified DraftKings and FanDuel that they would not be allowed to advertise during championship events, such as the NCAA men's basketball tournament. But at the same time, some conferences were accepting advertising from daily fantasy operators.

The Student Sports Protection Alliance, a new organization supported by the NCAA, several additional amateur sports organizations and the National Council on Problem Gambling, is lobbying states to include a carve-out prohibiting fantasy sports on amateur athletics in any legislation.

"We're not trying to stop the DFS industry from being legal or expanding ... into states where there's a question if it's legal or not," Maureen Riehl, executive director of Student Sports Protection Alliance, told ESPN. "But if that's going to happen, we want to make sure there's a carve-out for student sports."

Some NCAA athletes have taken issue with the daily fantasy sites as well. In January, former Northern Illinois running back Akeem Daniels filed suit against DraftKings and FanDuel and alleged the two sites "knowingly and improperly exploited [their] accomplishments." Another former Northern Illinois player, Cameron Stingily, has joined the case as a plaintiff. The case remains active.