A powerful bomb explosion killed at least 10 persons and wounded 40 tonight in a Madrid restaurant usually filled with rightist and middle-class patrons.

Although as yet no group has said it was responsible, it was assumed that the bombing was the work of extreme leftist terrorists.

In the past two days political terrorism has claimed 17 lives. Among the victims were a general, two colonels and their driver shot to death by ETA Basque guerrillas in Madrid Friday morning.

The explosion in the California 47 restaurant came only hours after the emotional funeral of Lt. Gen. Luis Gomez Hortiguela, 69, and the other two officers.

Members of the Fascist New Force organization tried to break through police lines and seize the coffins. They shouted the name of the late dictator Francisco Franco and called on the Army to take over.

News of the carnage in the restaurant, caused by a bomb left in a basement washroom, aroused New Force members to fever pitch. Hundreds rushed to the scene and milled around outside, shouting antigovernment slogans and attacking photographers and TV cameramen as rescue workers brought out the dead and the wounded.

The New Force party, which actively opposes Spain's emerging democratic system and would like to restore the Franco system, took the bombing as a provocation. Its headquarters are near the California 47 and many of its members met there.

Victims, however, were not all politically involved. Among them were elderly men and women who reside in a nearby fashionable neighborhoods. Hundreds of Madrid residents answered the appeal for blood donations for the wounded, who were rushed to hospitals and clinics.

The bombing heightened tension throughout the country. In the streets near the restaurant people expressed fear for their safety. Many restaurants that are usually filled in the evening were half empty.

Madrid's governor, Juan Roson, called on the people to remain calm. Police patrol cars toured the streets and officers with automatic weapons stood at key intersections.

Moderate political leaders expressed the fear that the weekend violence was a harbinger of a hot summer that will test Spain's fragile new democratic system.

High government officials, already concerned by the unrelenting wave of terrorism that has taken 68 lives so far this year, kept in close touch with public reaction to the bombing and pressed police for an early solution. Police found a second, unexploded bomb in the restaurant.

A waiter said the California had received a phone warning that there was a bomb in the washroom but it was ignored "because many calls in the past turned out to be a hoax."

Violence has not been confined to Madrid. A police inspector was killed in the southern city of Seville yesterday in a gunbattle with members of the October 1st Anti-Fascist Revolutionary Groups, an extreme left terrorist organization. Police said the group is collaborating with ETA, which is fighting for the independence of the Basque region.

King Juan Carlos was in Seville tonight. He presided at one of the Spanish armed forces most hallowed ceremonies - the swearing of loyalty to the flag. He was accompanied by Queen Sofla, who delivered a speech praising the military. The royal couple were under heavy guard.

The king and queen and members of the government, led by Premier Adolfo Suarez, will review the annual armed forces day parade today in Seville.

The violence since Friday, characterized by Spanish observers as the worst outbreak since the eve of the 1936-39 civil war, has cast a pall on the military celebrations. Many events scheduled to take place yesterday were cancelled.

During Franco's long dictatorship, the armed forces parade celebrated his civil war victory over the Spanish republic. To the resentment of many senior officers, the king and Premier Suarez now honor only the three services.

In the past few months rightist officers have publicly criticized government "softness" as encouraging terrorists to attack the millitary. This idea was expressed in rightist newspapers Saturday. CAPTION: Picture, Investigators check over the vehicle in which three Spanish officers were assassinated in Madrid Friday. OPI