Rioting and looting broke out today as 30,000 Nicaraguans protested the assassination on Tuesday of publisher and opposition leader Pedro Jaoquin Chamorro.

So intense were waves of violence that Chamorro's family agreed to move up his funeral - expected to draw 100,000 mourners - by three hours. Nevertheless, 10,000 persons showed up for the service, which was peaceful. About 30,000 persons, many shouting anti-government slogans, accompained the coffin to the cemetery.

In the earlier violence, a number of cars and buildings were burned, in including several businessman owned or controlled by Gen. Anastasio Somoza, the president whose family has run the Central American country for more than 4 years.

Police fired tear gas around the fringes of an early-morning crowd, estimated at 30,000. Surrounding a procession that carried Charmorro's casket from the newspaper office - the scene of an overnight wake - to his home.

The national guard reportedly closed off highways leading into the capital to prevent the entrances of additional thousands of mourners.

The guard which functions both as police and army, released a communique reporting the capture of four suspected assassins, the gun that killed Chamorro and one of the cars used to intercept him on his way to work Tuesday.

Crowds that sacked and burned buildings shouted "who murdered Charmorro? Somoza!" About 20 persons were injured, mostly trampled by the crowds. Guardsmen denied reports of one death and apparently no demonstrators were arrested.

The government disclaimed any responsibility for Charmorro's death. Among buildings burned was a branch of Citibank of New York, a branch of Bank of Central America, in which showroom and a blood plasma firm.

The blood bank, Plasmafersis, is partically owned by the Somoza family and was accused by Chamorro's newspaper of selling Nicaraguan poor people's bllod in Western Europe and the United States at exorbitant profits.

The second wave of rioting broke out just hours before the 1 p.m. funeral.

A large fire could be seen in the western part of the city, and several hundred people were in the streets, despite an announcement by the national guard that further demonstrations were forbidden.

Authorities estimated damage at $7 million in the city, which houses 300,000 of Nicaragua's 25 million population.

The national businessmen's council urged all shops and factories to close for 24 hours to protest the assassination.

The rioting began last night three blocks from Chamorro's La Prense plant, when some 150 people broke into the blood bank.

Buildings sacked and torched later included a textile plant owned by Somoza and a shoe factory and customs house said to be owned by Somoza or his supporters.

Looters carried merchandise out of the buildings and piled it into waitings cars. Some were robbed in turn by criminals posing as policeman.

LThe national guard identified the four suspected assassins as Silvo Pena, 28, and Horold Cedenos, 20, both former guardsmen, and Silvo Vega Zuniga and Domingo Acevedo, all Nicaraguans.

Chamorro was 1977 winner of the Maria Moors Cabot prize for his fight for human rights in Nicaragua. He battled the Somoza dynasty from the time its founder, Anastasio SomozaGarcia, father of the current president, took over in 1937.

Chamorro, 53, was buried following a Requiem Mass by Archibishop Miguel Ovanda Bravo, Roman Catholice Bishop of Managua.

"He was one of the greatest defenders of liberty and democracy," the archibshop said.

Charmorro's widow, Violeta Barrios, accompained at the funeral by her three children and several Roman Catholic priests, joined the crowd in shouting. "Viva Pedro Joaquin Chamorro," "Viva el libertad" and singing the Nicaraguan national anthem.