A strong earthquake struck southern Italy at dinner time yesterday, shaking an area from Sicily to Venice, devastating villages and triggering prison riots in Naples. Officials said at least 350 persons were killed and hundreds of others injured.

Rescue workers were hampered by dense fog as they picked the through rubble of collapsed buildings in Naples and other towns and villages stretching to the southern end of the Amalfi Coast resort area.

Officials said they feared the death toll would rise as rescue teams reached remote towns in the mountainous area. By early today, authorities had received reports of damage in 29 cities and towns.

The quake, which measured between 6.5 and 6.8 on the Richter scale, hit hardest in Potenza, 86 miles east-southeast of Naples. Officials there estimated that as many as 200 persons may be dead, including up to 100 trapped in a village church.

Scientists recorded a number of aftershocks, and tremors were reported continuing into the night.

Half of Potenza was severely damaged, and much of the nearby village of Balvano was devastated, officials said.

"The center of the town is no longer recognizable," said Don Salvatore Pagluca, parish priest in Balvano.

"It was terrible," the priest said in a telephone interview, his voice breaking. "Half my church collapsed, and there are still people in there."

Police said they feared that as many as 100 worshipers may have been in the Balvano church at the time and that most may have been killed.

Scores of dead and injured were reported in the towns and villages that line the coast of the Bay of Naples and in the island mountain towns.

Officials reported hundreds of injured crowding hospitals in the region, and urgent calls were broadcast for more physicians and drug supplies.

Dozens of buildings collapsed into piles of rubble in Naples, including a nine-story apartment building and a five-story building in nearby Castellemmare di Stabia.

Fires were reported throughout the city as well as in Potenza, Avellino and Salerno because of broken gas mains.

Naples police said the 2,000 inmates of the city's Poggiareale prison and those in a women's detention center at nearby Pozzuoli rioted and took several guards hostage when the quake struck. Police reinforcements surrounded both facilities and had to use tear gas to restore order, authorities said.

Scientists said the quake was centered in the rugged mountains about 50 miles east of Naples. It was clearly felt as far south as Sicily and far north as Venice and Trieste near the Yugoslav border. The Italian Interior Ministry said the epicenter was at Eboli, southeast of Naples.

Officals at the U.S. Geological Survey's Earthquake Information Center in Golden, Colo., said the quake was the strongest for that part of Italy since the organization began compiling records in 1910.

Foreign Minister Emilio Colombo and other officials meeting with British Prime Minister Margaret Thatcher in Rome cut the talks short so they could rush south to survey the disaster area.

Pope John Paul II, who was to meet Thatcher late this morning, was in his private apartments in the Vatican Palace at the time of the quake.

Physicians in the quake region canceled a planned 24-hour strike that was to begin today to press for better working conditions.

Rome's Leonardo Da Vinci International Airport was closed to traffic for 40 minutes when air control personnel abandoned their control tower as it started to sway, officials said.

It was the strongest quake measured in southern Italy since a major earthquake killed about 75,000 people at Messina, Sicily in 1908. The quake was the most powerful to hit Italy as a whole since May 1976, when a tremblor measuring 6.9 on the Richter scale killed 1,000 people.

The Richter scale measures ground motion as recorded on a seismograph. Every increase of one number means a tenfold increase in magnitude. An earthquake of 6 can cause severe damage, while one measuring 7 is a major earthquake.