A pre-dawn earthquake Monday sent people running into the streets and caused damage to buildings in Spain's north African enclave Melilla.

The U.S. Geological Survey said the quake measured 6.3 on the Richter scale and had its epicenter in the Mediterranean Sea about 48 miles northwest of Melilla, a small Spanish city surrounded by Morocco and the sea.

Spain's National Geographical Institute said the quake struck at 5:22 a.m. (11:22 p.m. EST) and had nearly a dozen aftershocks, including two measuring 4.6 about three hours later.

Melilla government president Juan Jose Imbroda said 15 people were treated for minor injuries, mostly bruises and cuts. He put the low number of injuries down to the fact that the quake took place before dawn and most people were indoors.

Spanish National Television images showed chunks of concrete on the ground that fell from apartment buildings in Melilla and residents who ran outside in their pajamas following the quake.

The quake was felt as far away as the cities of Cadiz and Malaga across the Mediterranean Sea in mainland Spain.

Imbroda said the city government building was probably the building most damaged and would remain closed for three days.

He cancelled school classes for children until firefighter inspectors could check the school buildings. He said it was not immediately known how many buildings were damaged.

The city government urged people to use cars as little as possible so as not to cause any traffic jams.

There were no immediate reports of what affect the quake may have had in Morocco.

Melilla has a population of some 85,000.