Juan Luis Cebrian, editor of the influential Madrid daily El Pais, said today that fundamental liberties are threatened in democratic Spain as a political storm erupted over a three-month suspended sentence for contempt imposed on Cebrian by the Supreme Court last night.

The contempt charge is based on an April 1978 editorial entitled "Press and Democracy" that scathingly attacked the enforcement of antiquated press laws based on the censorship established by the earlier dictatorship of Gen. Francisco Fraco.

The sentence is the first of its kind here against the editor of a major newspaper. It highlights a growing controversy about the role and the rights of the press that has led to a flurry of clashes between journalists and the judiciary in recent months.

At the center of the dispute is the gap between the 1978 democratic constitution, which guarantees freedom of expression, and archaic, Francoist courts that employ a penal code still awaiting a major overhaul.

Cebrian, 35, said the sentence passed against him, which cannot be appealed, "comes at a time when freedoms in our country are on the wane, particularly the freedom of expression." The president of the Spanish Federation of Press Associations, Luis Maria Anson, said the sentence "affects the entire Spanish profession" of journalism.

In the editorial, Cebrian said a court sentence, which at that time banned the editor of a pornographic magazine from practicing journalism for 32 years, was "reminiscent of Nazism and worthy of the present times of [Idj] Amin Dada," then dictator of Uganda. The statement was deemed contemptuous of the sentencing court.

Last night's sentence by the Supreme Court was based on an appeal against an earlier sentence by a lower court that had penalized Cebrian with a $75 fine for a minor case of contempt. Both Cebrian and the attorney general appealed against the sentence and the Supreme Court upheld, six to five, the attorney general's case that the charge constituted a grave case of contempt -- increasing the fine to $750 and ordering three months in jail.

Cebrian's jail term is in effect a suspended sentence since he does not have any previous convictions and need not serve it. But he would have to serve time if a court rules against him and his paper in any one of several pending cases.