KOS, Greece — A powerful overnight earthquake shook holiday resorts in Greece and Turkey, injuring nearly 500 people and leaving two tourists dead on the Greek island of Kos, where revelers at a bar were crushed in a building collapse.

Some of the injuries were caused as tourists and local residents scrambled out of buildings and even leapt from balconies after the 6.5-magnitude quake struck at about 1:30 a.m. local time.

Several hundred thousand vacationers and locals in the two countries were kept awake by dozens of aftershocks that followed the main quake, with many sleeping outdoors on sunbeds or slumped on cafe tables.

Authorities on Kos said the two dead tourists were from Sweden and Turkey. Thirteen others injured were airlifter to other Greek hospitals, include a foreign national who had to have a leg amputated and another with life-threatening head injuries.

In neighboring Turkey, authorities said some 350 people were hurt, most with light injuries as they fled buildings.

Seismologists said the shallow depth of the quake was to blame for the damage and a 60 centimeter (2-foot) sea swell that scattered cars, boats, and trash bins across shorelines in the east Aegean Sea.

Hundreds of revelers were in or near the popular White Corner Club — housed in a renovated building dating to the 1930s — in the old town of Kos when the building partially collapsed.

Christopher Hackland, a Scottish diving instructor, described the chaotic scene at his hotel when the quake struck.

"There was banging. There was shaking. The light was swinging, banging on the ceiling, crockery falling out of the cupboards, and pans were making noise," he told The Associated Press.

"There was a lot of screaming and crying and hysterics coming from the hotel. It felt like being at a theme park with one of the illusions, an optical illusion where you feel like you're upside down."

Turkey sent a vessel to Kos to bring some 200 Turkish tourists home, and named the dead tourist as Sinan Kurdoglu. The foreign ministry said a second national in serious condition was being evacuated to Athens for treatment.

The quake on Kos damaged churches, an old mosque, and the port's 14th century castle, along with old buildings in the town — but the damage was relatively limited.

Kos Mayor Giorgos Kyritsis said strict building codes have been in force for decades following a deadly earthquake in 1933 that flattened the island's main town.

"There are not many old buildings left on Kos. Nearly all the structures on the island have been built under the new codes to withstand earthquakes," the mayor said.

Before dawn rescue teams with sniffer dogs searched the rubble in the town while dozens of villages were also checked — but found no more injured people.

The quake caused cracks on walls of some buildings in the Turkish resort of Bodrum, flooded the lower floors of sea-front hotels and restaurants and sent moored boats crashing toward the shore.

The Istanbul-based Kandilli earthquake research center said the small "tsunami" pushed sea water up 100 meters (yards) inland.