BUCHAREST, ROMANIA, MAY 30 -- A powerful earthquake shook towns and villages throughout Romania today, leaving eight people dead, nearly 300 injured and sending out strong tremors that were felt as far away as Moscow and Istanbul.

Unspecified numbers of deaths and injuries were reported in the neighboring Soviet republic of Moldavia, as the initial shock wave rippled through the Carpathian Mountain Range in Central and Eastern Romania. Aftershocks lasting as long as a half-minute or more were felt at irregular intervals after the early-afternoon quake, some well after nightfall.

The quake, which set buildings wobbling around the country, was centered in the same region as strong temblors in 1977 and 1986. It sent thousands of the capital's 2.2 million residents into the streets, and many were injured as they leaped in panic from upper-story windows.

The extent of property damage could not be immediately learned, but the cost of repair and reconstruction will certainly be a blow to a nation still reacting to the shock of the bloody December revolution that ended four decades of totalitarian rule. Taking the lead in the earthquake clean-up could be the first test for President-elect Ion Iliescu.

Iliescu won a landslide victory in elections two weeks ago, but faces criticism from vocal opponents in the major cities, who say that he and his party -- the National Salvation Front -- are closet Communists who prospered while running Romania into the ground during the rule of dictator Nicolae Ceausescu.

The U.S. Geological Survey said the quake measured 6.5 on the open-ended Richter scale, with its epicenter believed to be about 100 miles northeast of Bucharest in the sparsely settled Carpathians. The temblor lasted about 45 seconds, according to Romanian state television.

There were reports of structural damage to many of the city's masonry apartment houses, but there were no reports of collapsed buildings or serious fires.

Indoors, ceilings shed plaster, chandeliers rocked and a low rumbling sound, like that of a distant subway train, was heard. Some people cowered in darkened hallways, too frightened to move. School buildings were evacuated.

Two deaths were reported in Bucharest, while the other fatalities occurred in the towns of Buzau, Brasov, Brailia and Prahova, to the north and east of the capital, according to Romanian police.

Strong tremors also were felt throughout Bulgaria, but Bulgarian state radio reported only minor property damage. One woman reportedly died of shock. The Kozlodovi Nuclear Power Station on the Danube River was closed, but the International Atomic Energy Commission in Vienna said the quake was unlikely to cause an accident at any nuclear-power plants in the region.

In the Soviet Union, the earthquake knocked out telephone lines in the Russian republic, the Ukraine and Moldavia. The Soviet news agency Tass quoted a legislator, Ilmar Bisher, as saying the quake had caused serious damage in Moldavia. "Not only destruction but dead and wounded," he said, but gave no details. In Moscow, the aging 10-story U.S. Embassy building was closed until saftey checks could be carried out.

Soviet President Mikhail Gorbachev, in Ottawa on the first leg of his visit to North America, said the quake had caused no major casualties or damage in his country and that there was no need for him to cut his trip short. In December 1988, the devastation and thousands of deaths caused by a powerful earthquake in Soviet Armenia led Gorbachev to curtail his meeting in Washington with president Reagan.

One group here that may actually have benefitted from the quake was the 70 or so hunger strikers who have been the center of a month-long anti-Communist demonstration here.

In the last week, the number of demonstrators joining them for daily protest rallies had dwindled from several thousand to about 100, the result of several days of cold rain and resignation of many here to the landslide election of a new government led by officials of the old Communist state.

On Tuesday night, Romanian state television had announced that it was time to move the demonstrators away from the major boulevard they have occupied since April 22.

More than 100 riot police had positioned themselves near the demonstrators' barricade by midday, but the quake brought thousands out on to the streets, and many of them joined the demonstration. They rebuked the riot police, who eventually withdrew.