The machinegun slayings of five Communist labor lawyers here last night has posed the gravest crisis faced by Premier Adolfo Suarez since he took office six months ago.

The killings sparked nationwide protests strikes today by tends of thousands of Spanish workers, a third day of student riots in Madrid, and demands that the government crack down on rightist gunmen. Union leaders called for a general strike Wednesday.

Suarez, who has been trying to lead Spain peacefully to a democracy, held emergency meetins throughout the day with Cabinet officers. He also kept King Juan Carlos advised on the violence that has resulted in seven deaths in the capital since Sunday.

Three of the lawyers were killed instantly by gunmen who broke into the legal aid office of the Communist-dominated Worder's Commission Labor Union. Two others died of wounds today and three more are in critical condition.

A student was shot to death by rightist gunmen Sunday after a demonstration demanding amnesty for political prisoners. A girld died yesterday when she was hit in the face by a smoke bomb fired by riot police.

Pressure on the government also came from conservatives. They are demanding action against the Oct. 1 Anti-Fascist Revoluntionary Group (GRAPO), the secretive leftist underground that yesterday kidnaped Lt. Gen. Emilio Vilaescusa, president of the Supreme Court of Military Justice.

Police have arrested 24 suspects. Five were Spaniards, according to police sources, and the rest were rightist from abroad, including seven Argentines, five Colombians, three Cubans, two Australians, and one each from Britain and Lebanon.

Last month GRAPO abducted the country's fourth ranking official, Antonio Maria de Oriol, president of the Council of State the guerillas have held him since then and have told the government that he will be released when 200 prisoners jailed for political violence are freed.

GRAPO said in a note to a Madrid newspaper last night that it seized Vilaescusa because of the student's slaying Sunday. The full text of the note, which contains threats, has not been published. GRAPO is still demanding the political prisoners' release.

The two rightist gunmen who attacked the Worker's Commission office in downtown Madrid after the general's abduction lined the lawyers up against the wall and shot htem with submachine guns equipped with silencers.

The bodies of the lawyers will lie in state in the Palace of Justice Wednesday afternoon. The government at first refused to grant permission but later relented. Only relatives and members of the bar association will be allowed to file past the bodies.

Left-wing and moderate opposition parties have asked followers to attend the funeral.

The Communist Party has asked members to avoid any demonstration that could lead to renewed street violence. A party spokesman said that the government was in enough trouble and that the Communists did not want to create problems for Suarez.

Students, however, held rallies today in Madrid to protest the worst escalation of violence since the death of dictator Francisco Franco in November 1975. Riot police broke up the demonstrations with smoke bombs and rubber bullets.

The government braced itself for massive demonstrations and stikes by the left Wednesday. The left has charged that rightist extremeists are seeking to reverse Suarez's democratization program.