BROOKLYN, N.Y. - Tears were flowing in a New York courtroom yesterday - and insults were flying in the hallway - as a federal judge cracked the whip on two contrite Philadelphia-area men who have admitted to paying former NBA referee Tim Donaghy for inside betting tips.

In handing James "Baba'' Battista and Thomas Martino stiff prison sentences, U.S. District Judge Carol Amon scolded the Cardinal O'Hara grads for running a gambling ring that she said compromised the "entire sport'' of basketball by corrupting a referee.

"No single person is more important to the integrity of the game,'' Amon said of NBA's refs.

That phrase and others, in which Amon emphasized the severity of the crimes and rejected several defense arguments for leniency, were seen by several courthouse observers as an ominous sign for Donaghy.

Despite their attorneys' requests for probation and house arrest, Amon sentenced Battista, of Phoenixville, to 15 months in prison for interstate gambling, and Martino, of Boothwyn, to a year and a day behind bars for wire fraud.

They also must pay their portion of the $217,267 in restitution that Amon said the NBA is owed.

Yesterday's sentences were on the high end of the guideline ranges for both defendants, which isn't good news for Donaghy. In a court filing last month, Assistant U.S. Attorney Jeffrey Goldberg described Donaghy as the "central figure'' in the three-man operation.

The Havertown-bred scourge of the NBA has been playing up the information he provided the government in an effort to dodge a potential 33-month jail term at his sentencing on Tuesday. Donaghy's lawyer, John Lauro, sat in the gallery of the Brooklyn courtroom yesterday, but declined comment.

Donaghy, 41, may have helped put his two high school classmates in jail by blabbing to the feds about their gambling operation, but Carl Tobias, a law professor at the University of Richmond who has been following the case, said Donaghy's chances of using that cooperation as a get-out-of-jail-free card probably diminished yesterday.

"It seems [Amon] is likely to give him jail time, too, and I would expect what we saw today was a pretty good guide,'' Tobias said.

Amon described the wire-fraud and gambling charges as "very significant and serious.'' Donaghy pleaded guilty to both charges, but he will try to leverage the fact that he cooperated with the feds, while Battista invoked his Fifth Amendment right against self-incrimination and Martino lied to the grand jury.

"It can get you some reduction, but unless it's an inconsequential offense, it usually doesn't get you completely out of jail time,'' Tobias said of federal cooperation agreements.

Battista, 43, also known as "Sheep,'' must surrender to authorities in September to begin serving his prison sentence. His lawyer, Jack McMahon, said Battista has quit booze, drugs and gambling and hopes to start a catering business.

"I'm not blaming either one of my co-defendants. I made bad choices and I take full responsibility,'' said Battista, a gum-chewing, burly man who has trimmed his once-formidable goatee.

Sitting at the defense table, Martino wiped a tear from each of his eyes while Battista, who was at times overcome by emotion, stood before the judge and apologized for his actions.

McMahon filed a motion early yesterday morning to revoke Battista's guilty plea after they became aware late Wednesday night that Battista would be required to pay restitution as part of his sentence. They eventually agreed to drop the motion, however, and McMahon said he would appeal Amon's restitution ruling.

Martino, 42, whose participation in the short-lived betting ring cost him a job at J.P. Morgan Chase that he had held for almost half his life, plans to graduate from cosmetology school in September and is "on the path to redemption,'' said his attorney, Vicki Herr.

Nevertheless, Amon said that path will run through a federal prison. Martino must surrender to authorities in October.

"I will never allow anything of this nature to ever happen again,'' said Martino, who wore a dark pinstriped suit to go with perfectly coifed, jet-black hair.

Herr said the 1-year sentence was too harsh for her client, whom Goldberg acknowledged played a "minor role'' in the scheme.

"The government was very unfair to Tommy,'' she said.

Prosecutors say Donaghy had been gambling on basketball games for 3 years with a Delaware County insurance salesman before he linked up with Battista and Donaghy in December 2006. Martino was the middleman in the operation, taking Donaghy's coded "picks'' by phone and delivering cash payments of $2,000, and later $5,000, when the picks hit. Battista used the picks, which were based on Donaghy's access to confidential NBA information, to place bets.

Tempers flared yesterday when Martino's older brother, John, confronted Battista after the hearing. John Martino, who was Battista's best man at his wedding, says he blames Battista for "exploiting'' his brother's "good nature'' by having him serve as a bagman in the operation - instead of doing his own dirty work.

"That's when McMahon said, 'You're gonna play that tune?' '' John Martino recounted afterward.

"I called him a big mouth and told him to come by my [third] brother's hair salon to get a haircut,'' he said of McMahon, who is bald. "In the heat of the moment, you go for the first thing you see and I saw that chrome dome.''

"You're a punk!'' McMahon could be heard yelling at John Martino outside the courtroom.

Downstairs in the lobby, Martino's father became infuriated at McMahon; with eyes bulging, he tried to lunge at McMahon and had to be restrained by both of his sons.

The NBA hopes the scandal will end with Donaghy's sentencing, but McMahon told reporters yesterday that he believes a second referee, Scott Foster, may have been involved with Donaghy's gambling.

Citing last week's Fox News report, McMahon said the former referee's 134 phone calls to Foster between October 2006 and April 2007 are "very, very suspicious'' and follow a pattern similar to that which Donaghy and Martino used to exchange betting information. Many of the conversations lasted less than 2 minutes and took place hours before or after games one of the men officiated. Calls occurred immediately before and after 54 of the 57 games Donaghy officiated from the beginning of the 2006-07 season to mid-March, according to Fox.

The NBA said last week that prosecutors have had "complete access'' to Donaghy's phone records and interviewed Foster and found no criminal conduct.

"To say there's nothing there is disingenuous,'' McMahon said, adding that he believes the Donaghy-Foster phone calls were not fully investigated because the NBA and the government didn't want to open a "can of worms'' by targeting another referee.

Goldberg declined to respond yesterday.

The fact that prosecutors are still asking Amon to reduce Donaghy's sentence in exchange for his cooperation likely indicates that they do not believe he withheld any significant information from investigators - which would include illegal activity committed by another NBA referee, such as Foster.

If prosecutors had determined that Foster was involved with Donaghy's gambling, they would likely have found Donaghy to be in violation of his cooperation agreement, which they have not done. *