The 7.0 magnitude tremor was centred off Turkey’s Izmir province, the US Geological Survey (USGS) said.
Turkey put the magnitude lower, at 6.6, saying 12 people had died and 419 were injured in the city of Izmir. On Samos, two teenagers were killed.
The shallow tremor triggered a mini-tsunami that flooded Izmir and Samos.
The USGS said the quake – which was felt as far away as Athens and Istanbul – struck at a depth of 10km (six miles), although Turkish officials said it was 16km below ground.
Turkey and Greece both sit on fault lines and earthquakes are common.
In Izmir, Turkey’s third largest city with the population of nearly three million, many people were seen running out into the streets in panic and fear after the quake struck. At least 20 buildings collapsed.
Videos have been posted on social media appearing to show the moment one multi-storey building went down, the BBC’s Orla Guerin in Istanbul reports. Other footage shows local people scrambling over rubble looking for survivors.
There were reports of flooding in the city after the sea level rose, and some fishermen are said to be missing.
“It was a really strong shaker almost enough to knock you off your feet. Running out of the house with my children was like a drunken wobble,” Chris Bedford, a retired British teacher who lives in Urla, west of Izmir, told the BBC.
One of the 12 confirmed victims drowned, the Turkish emergencies agency said.
Yasar Keles, an official in Sigacik, near Izmir, told BBC Turkish that a person died after their wheelchair was hit and overturned by the rising water.
Turkish President Recep Tayyip Erdogan said the government would help those affected by the quake “with all the means available to our state”.
In Greece, two teenagers were killed when a wall collapsed on Samos. Eight people were injured across the island.
A mini-tsunami flooded the port of Samos and a number of buildings were damaged. Greek officials put the magnitude of the tremor at 6.7.
“We felt it very strongly,” local journalist Manos Stefanakis told the BBC, adding that smaller aftershocks were continuing.
He said it was the biggest tremor to have hit the island since 1904.
Residents were urged to stay outdoors and keep away from coastal areas. About 45,000 people live on Samos.
‘We were scared there would be a tsunami’
Jude Wiggins, co-ordinator at women’s centre for refugees in Samos
The building began to shake in our centre so we ran out. Soon the roads began to flood.
We were scared there would be a tsunami so we ran up the hill.
I was in the kitchen. The washing machine was going and I thought it was just doing that thing when it shakes and moves around at first. But the fridge was moving.
I ran out. Women were running everywhere. For a lot of the women it’s quite traumatic as they’ve come from places like Syria and it could have felt like they were being bombed or something.
At some point everybody started to run. People were panicking. Our house is not safe to stay in as there are a lot of cracks.
For the people in the camps, they’ve lost everything in their own countries, they lost everything again in a fire and now lots of them have lost the tents they were sleeping in.
Reports said Friday’s quake was also felt on the Greek island of Crete.
Greek Prime Minister Kyriakos Mitsotakis said he called President Erdogan “to offer my condolences for the tragic loss of life from the earthquake that struck both our countries”.
“Whatever our differences, these are times when our people need to stand together,” Mr Mitsotakis wrote in a tweet.
In January more than 30 people were killed and more than 1,600 injured when an earthquake struck Sivrice in Turkey’s eastern Elazig province.
In July 2019, the Greek capital Athens was hit by a tremor that knocked out power to large parts of the city.
A powerful quake that struck the Turkish city of Izmit, near Istanbul, in 1999 killed about 17,000 people.