Premier Adolfo Suarez received a clear mandate in Thursday's parliamentary election to remain as head of the Spanish government for four years, but it was at the price of bringing to the fore-front divisive regional ntionalisms.

Almost complete returns gave Suarez's Center Democratic Union 167 serats, one less than in the 1977 election that was the first after the death of dictator Francisco Franco.

The main opposition party, the Socialists, lost two seats, dropping to 120 in the 350-member lower house of parliament elected to a four-year term.

Among the national parties, only the Communists made gains, going from 9.2 percent of the vote to 10.5 percent and from 19 seats to 23.

The Center Democratic Union's popular vote slipped slightly, from 34.7 percent to 34 percent, and the Socialists' from 33.7 percent to 29. Final returns, which may not be available for weeks, can only change the picture marginally.

The most dramatic gains were made by regionalist parties, which won about 30 seats. Twelve went to the separatist-inclined Basques, including four seats to two parties that represent the two wings of the terrorist ETA organization. It openly demands independence and has taken responsibility for 20 assassinatons of security officials this year.

Basque nationalist parties won 48 percent of the vote in that region and 12 of the 22 seats. Among those elected was Telesfero de Monzon, 75, who is being held in a prison hospital and was the interior minister in the Basque autonomist government under the Spanish Republic of the 1930s.

The ETA deputies have vowed not to take their seats in the parliament.

Nationalists from Catalonia, another Spanish region with a distinct language and culture, held on to their 10 seats despite widespread predictions that they would be reduced.

For the first time, five autonomist deputies won seats from Andalusia -- Spain's poor southernmost province that is home of the flamenco and of the highest rural unemployement. Other autonomists were elected from Aragon and the Canary Islands.

Luis Apostua, a leading Center Democratic Union deputy from Madrid, called the results in the Basque country "alarming" and said the election of separatist deputies is "a danger to national unity."

Some diplomatic analysts predicted that the outcome would arouse the opponents of moderate regional autonomy arrangements who argue that granting even limited autonomy will only lead to further demands. Those opponents are heavily represented in the armed forces.

Although yesterday's election formally marked the end of the transition begun in 1975 with the death of Franco after 40 years of dictatorhsip, the regional problem may foce Premier Suarez to continue politics of consensus.

Suarez associated the Socialists and Communists in the constitution writing that ended in December with a national referendum to adopt the new democratic charter. The leftist parties eagerly accepted this indication of respectability after their political banishment under Franco.

This first election under the new constitution who to mark the start of normal parliamentary politics. But Suarez may need to continue the consensus approach to get general support for whatever decentralization measures he proposes.

The Communists are continuing their demands for a government of national unity.

"Those who wrote the constitution together should put it into application together to complete the consolidation of democracy," said Manuel Azcarate, a Communist leader, in an interview today.

The Socialists, who thought they would emerge the victors, have been silent so far.Many analysts assume that Socialist leader Felipe Gonzalez will be under great pressure from the Markist wing of his party to move to the left -- arguing that Gonzalez's electoral approach of crowding into the political center with Suarez failed to pay off.

Gonzalez had said he intended to move to drop any reference to Marxism in the party statutes at the forthcoming party congress. It now seems doubtful that he can make that symbolic move to complete the party's transition from a revolutionary tradition to a social democratic one.

The elections nevertheless did confirm a trend -- outside of the regionist tendencies -- from a multi-party system to a two-party system.

The rightist party of Franco's former information minister, Manuel Fraga Iribarne, was reduced from 17 seats in 1977 to 10 seats. The Fraga group dropped from 8.3 percent to 5 percent of the vote.

By maintaining the Center Democratic Union as a minority in parliament within 10 seats of control, Suarez won what was considered by political strategists to be a long shot.

He was not required to hold the election immediately under the new constitution. But he would soon have to hodl the first municipal elections since Franco. Leftist city hall victories in such traditional Socialist strongholds as Madrid and Varcelona would have represebted a major challenge to Suarez.

Now that he has demonstrated that the left could not win nationally, any leftist municipal victories next month should not represent a real threat to the premier.