The restless Spanish regions are well on the way to winning a degree of self-rule, but the issue remains charged with conflicting emotions involving just what autonomy means and how the process will affect national unity.

Only a few weeks ago the rich Catalan provinces were given provincial but limited self-rule by King Juan Carlos and Premier Adolfo Suarez. It was a negotiated settlement restoring rights abrogated by the late dictator Francisco Franco following the 1936-39 civil war.

The first Catalan regional government since the conflict was formed last week. It includes Communists and Socialists and is headed by Joseph Tarradellas, 78, who opposed Franco and kept the Catalan government alive during long years of exile.

It was clear that the king and the premier had hoped that the Catalan model would lead to similar temporary self-rule arrangements with regionalist movements in other parts of Spain. Their expectations have been upset, however, by outbreaks of violence in the always difficult Basque provinces and in the poor southern Andalusian provinces.

Two weekends ago, demonstrations for Andalusian autonomy by millions throughout Spain were marred by clashes between Andalusian nationalists and riot police in the southern resort city of Malaga. Mixed in with the Andalusian demonstrators were Galicians seeking autonomy for their poor northwestern region.

Reports indicate that the wide-spread street fighting - which began Dec. 4 and ended two days later - was as violent as any since the king succeeded Franco two years ago.

Malaga erupted when police tried to stop demonstrators from placing the white-and-green Andalusian flag atop the provincial council building -where the red-and-yellow national flag was flying alone. A Communist youth was killed by a gunshot in the ensuing struggle. Witnesses said police kept firing at him as he tried to crawl to safety after he was hit by a bullet. Investigators said the riot police fired smoke bombs into a hospital where injured demonstrators were being treated.

Scores were injured in the next 72 hour. A Roman Catholic priest trying to calm both police and demonstrators was arrested, taken to police headquarters and beaten so severely the he lost the sight of his right eye. He told interviewers that police forced him to salute Franco's portrait and that he was beaten severely in the kidneys.

Rioters in Malaga, which has one of Spain's largest unemployment problems, looted stores, banks and public buildings. Damage was estimated at more than $1.5 million. Police struck even old men taking early morning promenades. Among those hit by police was a Socialist deputy who gave a detailed account of the incident to reporters.

The rioting in Malaga was more than a protest against the killing. It seemed to be an outburst against unemployment, against perennial poverty in a region of vast estates often run like feudal fiefs, against economic conditions which force thousands of Andalusians to emigrate either to other parts of Spain or to northern Europe in search of jobs, and against local officials appointed during the Franco dictatorship.

Sensitive to regional feeling in Andalusia, the government sent special investigators to Malaga, and Parliament will meet to determine what went wrong in a march supported by all political parties except the facist Fuerza Nueva Party and authorized by the civil governor. Police said they had to use firearms because they were trapped by rioters.

The left is strong in the region. Socialists elected a large number of deputies in June elections, Spain's first free polling in 41 years.

The regional issue would have been brought to the foreground one again even without the violence. The Dec. 4 demonstration was probably the largest even in Spain. More than 3 million people paraded.

Still the most difficult regional problem is in the north, with the Basque provinces. The government and Basque parliamentarians have been making progress in the past few weeks on a provisional pact giving the Basque provinces a greater degree of provisional self-rule than the Catalans.

The negotiations have bogged down over the inclusion of Navarre in Euskadi , as the Basques call the region. The government party, the Center Democratic Union, and many Navarre conservatives argue that the province is not part of the Basque region.

Navarre was the only Basque province to side with Franco during the civil war. But in the last few years the province has become highly industrialized and workers have turned sharply to the left, leading to a polarization that has sparked repeated violent confrontations. The latest was in Pamplona two weeks ago, when those who want to join the other three Basque provinces - Alava, Guipuzcoa and Vizcaya - clashed with demonstrators opposed to a link.

The clash was given added significance because it followed the killing of the Pamplona police chief by ETA, the Basque separatist underground. Rightists and army officers opposed to giving the Basques any self-rule seized on the killing to show their sentiment.

So many military masses were held for the slain chief, a regular army officer, that the government had to put a stop to the religious ceremonies because of the political overtones. At one requiem mass there were 15 Roman Catholic military chaplains and an array of high officers.

The Basque question worries the government because separatist feeling is strong in the region. Officials contend that while political leaders there publicly decry and condemn ETA's killings of police, Franco-appointed provincial officials and rightist industrialists, in private they defend the organization.

This sort of attitude does not exist in other egions. Catalonia has been relatively free of violence for several years, so have Andalusia, and in Galicia the people take to the streets on issues that effect their interests as farmers and fishermen.

The only other Spanish region plagued by urban guerrillas is far away - the Canary Islands. A separatist underground appears to be gaining strength in the archipelago, which is more than a thousand miles from Madrid off northwest Africa. The government is trying to include the islands in its overall self-rule scheme.