Three years ago, when gamblers suddenly began cleaning up on Detroit Pistons games with uncanny success, Las Vegas oddsmakers took steps to protect their interests.

First, they stopped taking bets on the Pistons. Then someone contacted National Basketball Association officials. Bill Malone, the NBA security representative for the Denver Nuggets, was part of the investigation.

Malone, a retired FBI agent who also serves as the National Football League`s security representative for Denver Broncos, used his organized crime background to check with sources on the unusual play. Months later, the NBA quietly took action.

In a move that went largely unreported, professional psychologist Mel Hoberman, a member of the Pistons scorekeeping crew for seven years and a former towel boy for the team, was removed as timekeeper in December of 1984 and reassigned.

Within days in Nevada, the Pistons were back on the board.

Sid Diamond, sports book director at the Edgewater Hotel in Laughlin, Nev., believes he was one of the first to detect the over-under

irregularities.

''I recognized it the season before, primarily because the one team kept going in the same direction--either under or over,'' Diamond said. ''Nobody listened to me that first year.''

Within months, the word was out and ''everybody started following the trend. Everybody was going the same way''--which was betting the total points would exceed the oddsmakers` over bet.

Say the oddsmakers established 220 as the line. Bettors can wager that the final points of the two teams will either exceed 220 or bet that it will be under that number.

''About 85-90 percent of the bets were going one way, and that`s not normal,'' said Diamond. ''It was like a red apple standing out in a barrel of green apples.''

Bill Halls, basketball reporter for the Detroit News at the time, said the investigation came after allegations from Las Vegas bookies that a gambler had won ''something like 21 straight overs.''

''The scenario was that the guy on the clock could add or subtract a significant amount of time in the game by stopping late or running a couple seconds longer.''

A longer game meant more points, increasing the chances of ''over''

bettors who wagered that the two-team totals would surpass the bookie`s line. Shorter games would favor the ''under'' bettors.

Diamond said his suspicions were confirmed when he and a reporter timed Detroit home games with stopwatches. He said they found that the games in question were running five-six minutes longer than what they clocked.

And with two NBA teams scoring, on average, 4.5 points per minute, the extra points ''were astronomical,'' said Diamond.

Scotty Stirling, vice president of NBA operations at the time, told the Detroit News that Hoberman was removed from the clock as a result of ''an ongoing employee evaluation and the competence was not up to our standards.'' No charges were filed.

Hoberman said NBA officials told him that timekeepers in five or six cities had been reassigned. In denying any wrongdoing, Hoberman said he was

''flabbergasted'' and ''really shocked'' by his removal. He remains on the scorekeeping crew but does not operate the clock.