A D.C. Superior Court judge, declaring that "political terrorism cannot be tolerated in the nation's capital," handed down stiff sentences yesterday to two men convicted of involvement in the 1980 slaying of Iranian exile Ali Akbar Tabatabai.

Judge Fred B. Ugast sentenced Ahmed Rauf, also known as Horace Butler, a 37-year-old cabinetmaker, to serve 8 to 30 years in prison. He also sentenced Ali Abdul-Mani, 26, also known as Lee Curtis Manning, to serve 6 1/4 to 25 years. Tabatabai was shot in the doorway of his Bethesda home by a man posing as a mail carrier.

Neither defendant has a prior criminal record and neither was convicted of actually conspiring with the accused triggerman, Daoud Salahuddin, also known as David Belfield, to murder Tabatabai, who was one of the foremost critics outside Iran of the regime of Ayatollah Ruhollah Khomeini.

Salahuddin, a one-time security guard at the Iranian Interests Section at the Algerian Embassy, is believed to have fled to Iran. Rauf and Abdul-Mani were convicted on Dec. 3 after a lengthy trial.

Ugast said it was a "tragedy" that Abdul-Mani, whom he called a "good family man" and a "man of intellect" who "has much to offer his fellow citizens," was in the courtroom yesterday.

But Ugast said he had to "look at the other side . . . at the tragedy of a man who is not alive," and at an "act of terrorism . . . a political assassination apparently in the name of some cause . . . for political or religious reasons."

Ugast called political terrorism "part of everyday life in some parts of the world, but, thank God, not here." The last political assassination in the Washington area, aside from the Tabatabai slaying, was the killing of Chilean exile Orlando Letelier in September 1976. Two staunch anti-Castro Cuban exiles were convicted in the slaying, but later acquitted in a retrial.

Ugast said he had to "signal the community, and the international community, that such conduct would not be tolerated."

Ugast called Rauf, a decorated Air Force veteran, a "man of ability " who operated a successful business and "allowed himself to become part of a terrorist group.

"The evidence indicates the 'staging area' for this killing was your apartment," Ugast told Rauf. "You were on the scene," he said, when a postal vehicle used in Salahuddin's plan to pose as a mailman was obtained.

Ugast sentenced Rauf to serve a minimum of six years for being an accessory after the fact to the murder and to serve at least two years for grand larceny of the vehicle.

Ugast sentenced Abdul-Mani to serve 5 to 18 years in prison after he was found guilty of making a false stolen car report as part of a cover-up a week after the assassination. He lent a rental car to Salahuddin, who used it to escape after the shooting. Abdul-Mani was also sentenced to 15 months to 7 years for lying to a grand jury when he testified that he had never lent the car to Salahuddin.