Tim Donaghy, who was the referee at the heart of the NBA's most notorious sports betting scandal in the late 2000s, spoke with CNBC about legalization of sports betting and the problem he foresees, both in the NBA and in the NCAA, as it becomes more mainstream after the landmark U.S. Supreme Court decision to allow gambling on games across the country. Donaghy, who served 15 months on counts of conspiracy to engage in wire fraud and transmitting betting information through interstate commerce, also discusses what he would do differently if he could go back in time. He currently co-runs Ref Picks, a handicapping service, with his business partner, longtime sports bettor and media personality Danny Biancullo. The following Q&A is based on a CNBC phone interview with Donaghy and has been edited for length and clarity.

Former NBA guard Mike Bibby of the Sacramento Kings argues with former NBA referee Tim Donaghy during a 2004 playoff game against the Dallas Mavericks. Ronald Martinez | Getty Images

When you first heard the U.S. Supreme Court ruling, what were your thoughts? First thoughts were that it was long overdue and sports leagues are now going to take advantage of the fact that gambling is legal and do everything they can do to capitalize on the revenue and grab a piece of the pie. The fight for nationwide legalized sports betting has been going on for years. The NBA was one of the first leagues to support betting. Is that because they saw it coming? No doubt, they knew it was going to happen. If it happens and they're supporting it, now when they go to take advantage of the revenue, they look like they supported it from the beginning. They knew it was going to happen, regardless of their support. Are the legal bookmakers going to have trouble getting the bettors to move over from the illegal markets? Can the legal markets succeed? I think people are still going to go to the local bookies for a lot of reasons. They are going to want to avoid paying taxes when they win and stay away from paying any fees to the leagues. People think that these underground bookies are going to go away. I think there's going to be more underground bookies because now gambling looks legal, but it's going to be illegal to take bets, but I don't think they're going to crack down on it as hard as it has in the past.

People think that these underground bookies are going to go away. I think there's going to be more.

In the future you're going to be able to go into a 7-Eleven and buy a ticket on a game, and people who don't use gambling as often as others do, like the people who go and buy lottery tickets, there's going to be more opportunity for people to do it. And with people casually gambling throughout the country, it's going to generate a lot of money. Have you been keeping up to date with the integrity-fee debate?

I have. I think it's kind of a joke because [the leagues] are now saying they need this money to police the game that they should have been policing at the highest level all along. I'm not too sure how they can say they need the money to protect the integrity of the game when that should have been one of the top priorities before gambling passed. So it's kind of confusing and comical at the same time. How would you stop scandals from happening if you were in charge? I think what you do is educate everybody. No doubt that another scandal is going to happen. I think it happens at a college level. Where some of these college kids get in [financial] trouble, maybe online poker, and then need to bail themselves out by winning a game that they're involved in. So they win by 10 when the line is 12 or 14. So in their mind, they're not hurting their team. They're just collecting money and not winning by as many as the line indicates they should. The scandals will happen at the college level, with some of these athletes who are going to get themselves in [financial] trouble [by gambling]. Do you see the legalization of sports betting as a stepping-stone to players getting paid? Possibly as a way to counteract the temptation? No. I think that whether they have the money or not, they can still get in trouble with gambling and try to find a way to bail themselves out. With legalized betting, there's going to be more avenues to gamble and more opportunity, and eventually, someone is going to get themselves into some trouble.

So you see trouble for the NCAA? What about the NBA? Have they cleaned up their act with regard to how referees officiate? No. I don't think it's cleaned up. I still see referees officiating based on names on the front and back of jerseys and not based on how the rules are written in the rule book. I still see officials advancing in the playoffs who have had poor performances and embarrassed the league. A prime example is [NBA referee Zach Zarba] at the end of game 5 [in the Boston-Philadelphia Eastern Conference Semifinals series]. He misses two critical calls that would have most likely given Philadelphia the win. Instead, the series is over and it cost that franchise millions of dollars. Who knows, maybe they go back to Philly; maybe they win game 6 and it goes to game 7. And yet he advances to the third round of the playoffs. If an NCAA college basketball official has a poor game like that, they definitely wouldn't advance to the next round. It's still the same old situation with the NBA in regard to referees advancing based on relationships they have with whoever their supervisor is. The league did come out and say they were wrong for those calls in the game's two-minute report ... [The NBA] admitted it, but how do you let that [referee] advance and get his bonus for being in the third round. It just doesn't make sense. Are the referees giving players star treatment because of personal preference or is there something more to it? You've previously talked about the 2006 Mavericks-Heat NBA Finals as a series where the referees were given a mandate to ref a certain way, in a manner that extended the series. Do you believe there are mandates in place today with regard to how referees officiate? Stars get the benefit of an extra step and the ability to go to the line more than other people do. It's just the way it's been, and it's the way it's always going to be. For whatever reason, things haven't changed. If they want to change it and say they have integrity and look at all this stuff, they shouldn't advance the referees that make critical mistakes. Have you seen any playoff series since you've been out of the game that made you wonder what's going on, similar to the 2006 Mavericks series? Not to that extent. I think when you talk about a series like that and the one with the Lakers [in 2001] advancing where Sacramento should have won a championship, those referees back then, Dick Bavetta and Bob Delaney, guys who would openly talk about big market teams and teams down in series that you need to give the benefit of the call. That's a thing of the past. You don't openly talk about things the way they've talked about it.

Some officials are afraid to blow the whistle with 20,000 people screaming. ... Some officials love to have the crowd go against them. There's definitely some situations where you can take advantage based on who the officials are.