More than 100,000 outlawed Spanish Communists and leftists raised clenched fists and threw red carnations here this afternoon as they paid final homage to three of five party lawyers slain by rightist gunmen. The funeral had been grudgingly authorized by the beleguered government.

Premier Adolfo Suarez, caught in a squeeze between the anti-democratic right and the left, met with his Cabinet this afternoon to consider ways of dealing with the escalation of political violence. Since the weekend, seven persons have been killed and a high-ranking military judge kidnaped.

The government tonight banned all demonstrations in an effort to half the growing turmoil. It also granted police the power to search homes without warrants and to detain suspected terrorists for up to 10 days without formally charging them.

Hundreds of thousands of Spanish workers staged peaceful protest strikes throughout the nation for the second day. Communist labor leader Nicolas Sartorius said the number of strikers today was near 2,000,000.

Underlining the gravity of developments. Premier Surez canceled a trip to Egypt, Iraq and Syria that was to begin today as part of Spain's attempts to increase trade with the Arab world.

Leftists and moderates as well as te liberal Madrid daily El Pais today urged Suraez to name a more representative Cabinet to deal with the worst political crisis since the death of dictator Francisco Franco 14 months ago. The Democratic opposition reiterated its charge that the violence was being masterminded by the entrenched right in the police and military as an excuse to stage a military coup.

The country has been shaken by the sudden eruption of events, which threaten the government's plans to hold the first free parliamentary elections since the 1936-39 civil war.

Suarez reportedly has rejected pressure by conservatives to declared martial law. Lt. Gen. Jose Vega Rodriguez, chief of the Madrid military region, said today that such a measure was unnecessary.

The funeral, attended by COmmunist Party General Secretary Santiago Carrillo and Central Committee members, was permitted by the government at the last moment and was heavily guarded by riot police reinforced with detachments from garrisons outside the tense capital.

Minor clashes were reported between police and the mourners who marched behind hearses.

Tens of thousands filed through the Palace of Justice to view the bodies.

It was the first time since the Civil War that the party was permitted to mourn its dead in public. Two other Communists slain Monday in the rightist machinegun attack in a legal office of the party-controlled workers' commissions were buried quietly earlier today at the request of their families. Two others wounded in the raid remain in critical condition.

The cortege was policed by 1,500 party militants. Time and again they called for silence and calm. When a group of 500 clashed with police, the party militants helped restore order.

A Roman Catholic priest read a funeral oration when the body of one of the lawyers was lowered into the grave. He asked believers to pray and others to remain silent.

Communist executive committee member Simon Sanchez Montero also spoke. He said that the killers were trying to "bloody Spain again. We will not fall into the trap . . . We want a democratic Spain, a happy Spain."

Under arrest in connection with the slayings were 24 persons - five Spainards and 19 foreigners, including several Latin Americans. Police today expelled 75 aliens for rightist activities. Most were South Americans. Rightists from Argentina, Colombia, Cuba and Chile have been active in Spain for years.

There were no new developments on the kidnaping of Lt. Gen. Emilio Villaescusa, kidnaped Monday by a leftist urban underground group that seeks release of 200 political prisoners.