Tim Donaghy, the NBA ref at the center of a federal investigation into fixing games and betting on contests he officiated, was forced into helping crooked gamblers by a fledgling gangster who threatened him, The Post has learned.

Donaghy, 40, was a troubled gambler who placed high-stakes bets on just about anything he could – including his own rounds of golf – before the Philadelphia-based wiseguy wannabe learned the ref bet on games that he worked, sources said.

The thug’s threats to expose Donaghy pressured the ref into feeding crooked gamblers privileged information that helped them win bets against the point spread – the margin of victory on which bettors wager – on NBA games, sources said.

Donaghy also made officiating calls during games that affected margins of victory, the sources said.

The investigation, which originated in the Eastern District of New York and is being presented to a grand jury, is likely to lead to arrests within the next week of the referee and at least two others, the sources said. He is expected to turn himself in.

Donaghy now lives in Bradenton, Fla., but still spends a considerable amount of time in the Philadelphia area.

“The tragedy is he wasn’t a bad ref,” a source said. “Once he got mixed up, they wouldn’t let him go.”

Donaghy’s lawyer, John Lauro, and the FBI declined to comment. A woman at Donaghy’s Florida home shouted through the door, “We have no comment.”

The scheme involving Donaghy was uncovered during a sweeping investigation into high-ranking members of the Gambino crime family, sources told The Post.

“It stems from an investigation into the administration of the Gambino family,” said one source, who added that no one has yet been charged in that investigation.

The instigator of the plot allegedly used his contacts in the crime family to intimidate the NBA official with “veiled threats of violence” against Donaghy and his family, as well as the more immediate pledge to expose him, sources said.

During wiretaps of mobsters, a conversation involving the allegedly crooked ref was picked up and sparked an investigation.

Very recently, the FBI confronted Donaghy, who began to cooperate with authorities, sources said. He resigned his NBA post in the past week.

In what is swiftly turning into the biggest black eye in NBA history, some of the information that Donaghy allegedly fed to gamblers could cause sweeping changes to the league.

“This is a systemic issue for the NBA,” a source said.

For instance, authorities are investigating whether Donaghy tipped off gamblers as to which referees were going to be calling a game before it was made public.

It’s well known that referees have different styles of calling games that can affect how coaches manage the team and how different players are used.

A thornier issue for the NBA is long-running speculation that certain referees harbor deep dislike and bias against certain players.

“There’s a lot of bias, judgment calls, who likes who, how they call a game,” a source said. “This information is proprietary and worth a lot to gamblers and the bookmakers.”

In a statement yesterday, NBA Commissioner David Stern said the league wanted to “assure our fans that no amount of effort, time or personnel is being spared to assist in this investigation, to bring to justice an individual who has betrayed the most sacred trust in professional sports, and to take the necessary steps to protect against this ever happening again.”

Barry Mano, president of the National Association of Sports Officials, told the Los Angeles Times, “If this is true, it is a tragedy of enormous proportion, not just for himself and his family but for our industry. It cannot be understated what a terrible thing this could end up being.”

The ref had just finished his 13th season in the league, officiating more than 700 games and more than a dozen playoff matches. One of his regular-season games was the infamous 2004 Indiana Pacers-Detroit Pistons brawl at the Palace at Auburn Hills, Mich., when Pacers forward Ron Artest attacked a fan in the stands.

LeBron James, a star forward for the Cleveland Cavaliers, was stunned by news of the probe.

“As a competitor, as hard as I play, it is disappointing, definitely,” he said.

Pistons guard Chauncey Billups said, “Everybody had the same kind of reaction, whether you played in the league or [are] just a regular citizen.”

But many players said they thought well of the veteran official.

“Suspect anything? No, of course not,” said one player. “I thought he was one of the good ones.”

Donaghy’s gambling allegedly put him in the company of some bad characters, including the one who would eventually blackmail him, sources said.

Others involved in the gambling scheme are helping investigators and receiving FBI protection, sources added.

Though Donaghy did charity work in his community, he was known for his fiery temper that has led to fights with players and even neighbors.

In 2003 the NBA investigated an allegation that then-Portland Trail Blazers forward Rasheed Wallace cursed out the referee over a technical foul called against him.

In a game two seasons earlier when Blazers guard Bonzi Wells allegedly “intentionally struck” Donaghy.

Then, in 2005, Donaghy was sued by his West Chester, Pa., neighbor for instigating “a pattern of public harassment.”

Donaghy was also charged after a verbal dispute with a postal carrier, but the case was tossed when the carrier didn’t show up for a hearing, according to the Philadelphia Inquirer.

Donaghy’s Florida neighbors said he moved onto the block less than a year ago, and his house was already up for sale.

One NBA coach told The Post about the betting scandal: “Our officials are so scrutinized and evaluated, I’m shocked something like this could happen. I mean, even the evaluators are evaluated.”

But others believe that if any of the allegations are proven true, it could deal pro basketball an irreversible blow.

“What will happen is every time there is an arguable call at the end of games, fans are going to say, ‘See? Told you. It’s crooked,’ ” said an NBA team executive, who asked not to be identified.

Additional reporting by Fred Kerber and Post Wire Services

murray.weiss@nypost.com