NEW YORK (AP) _ A federal judge, in a groundbreaking ruling, has ordered four convicted leaders of the Mafia-run ''Pizza Connection'' heroin and cocaine ring to pay $2.5 million to a fund to treat addicts.

U.S. District Judge Pierre Leval made the order as he handed out 45-year sentences to ringleaders Gaetano Badalamenti, reputedly the former head of the Sicilian Mafia, and Salvatore Catalano, New York boss of the drug operation.

''People like Badalamenti and Catalano do describable, definable damage to our society,'' U.S. Attorney Rudolph W. Giuliani said after Monday's sentencing. ''They really are like mass murderers, and they should pay for the damage they have done.''

While Leval did not sentence the two to life imprisonment, as prosecutors had asked, the men are not eligible for parole because of their conviction as drug kingpins, Giuliani said.

Leval ordered Catalano to make restitution to drug addicts by paying $1 million to a fund to provide them with medical and psychiatric treatment, and ordered three other defendants to pay $500,000 each into the same fund.

The 64-year-old Badalamenti, because of the terms of his extradition from Spain, could not be ordered to make restitution.

Leval said creation of the fund, which the prosecutors had requested, appeared to be unique in a drug case. Giuliani said he believed the action was unprecedented.

''I see no reason why (the restitution law) should not be applicable,'' Leval said. ''Importation of narcotic drugs into the United States causes severe bodily injury requiring medical and psychiatric care and therapy.''

The five were the first to be sentenced of 18 convicted in the ring, which used pizzerias as drug distribution fronts from 1975 to 1984. Prosecutors said the 17-month trial for the first time tied the Sicilian and U.S. factions of the Mafia to drug trafficking.

In addition to their prison terms, Catalano, 46, was fined $1.15 million and Badalamenti, 64, was fined $125,000. With time off for good behavior, each must serve about 30 years in prison, Giuliani said.

Guiseppe Lamberti, 55, also ineligibile for parole, was sentenced to 35 years and fined $150,000. Salvatore Mazzurco, 57, received 35 years and a $50,000 fine, and Savatore Lamberti, 55, got 20 years and a $50,000 fine; they can be paroled after serving a minimum one-third of their terms.

At a sentencing hearing, prosecutor Louis Freeh called Badalamenti the ''chairman of the board'' of the Sicilian Mafia from 1975 to 1978, and likened all the defendants to ''bloodsucking parasites'' for profiteering from addicts.

''Drug dealing is a disease, it's a cancer, it's a plague upon society,'' Freeh told Leval in urging maximum prison terms. ''There are war zones in this city that have been devastated by these defendants.''

Prosecutors had filed a memorandum calling the ring ''one of the most efficient and dangerous criminal groups in the world'' and linking its members to scores of murders. It noted that one defendant was murdered and another was shot but survived in the closing months of the trial.

Participants were accused of importing heroin from the Middle East and cocaine from South America and laundering profits through Swiss bank accounts. One defendant, Badalament's 29-year-old son, Vito, was acquitted of all counts.

The elder Badalamenti, of Cinisi, Sicily, and Catalano, of Queens, were convicted of narcotics conspiracy and participating in a criminal enterprise; Catalano also was convicted of racketeering and money laundering. Giuseppe Lamberti, of Baldwin, was convicted of drug conspiracy, criminal enterprise and racketeering. Mazzurco, of Baldwin, and Salvatore Lamberti, of Woodmere, were convicted of drug conspiracy and racketeering. The Lambertis are cousins.

Before Leval ruled, lawyers for all but Badalamenti argued that their clients' roles in the ring and in the Mafia had been overstated by prosecutors. Badalamenti and his lawyer made no comments.