At least 21 people are dead and 600 injured after an earthquake struck Albania, flattening buildings, tearing open roads and prompting countries across the Balkans to send rescue teams to help local crews search for survivors.

The 6.4 magnitude quake struck just before 4am on Tuesday with an epicentre 30km northwest of the Albanian capital, Tirana, where people were shaken awake and rushed into the pre-dawn streets in alarm.

The Adriatic port of Durres and the nearby town of Thumane suffered the most serious damage and the greatest number of casualties, as apartment buildings collapsed around sleeping residents who had little time to escape.

“The roof collapsed on our head and I don’t know how we escaped. God helped us,” Marjana Gjoka (48) told Reuters in Thumane, where she had been asleep with her three-year-old niece in a fourth-floor apartment when the quake began.

In Durres, local resident Astrit Cana watched rescuers trying to reach people who were thought to be trapped in the rubble of a five-storey building: “It’s terrible. It’s horrible. We hope they’ll get them out alive,” he told the AFP news agency.

Officials said hundreds of Albanian soldiers and almost 2,000 police officers had been sent to the Durres, Thumane and the surrounding area to help with the rescue operation and set up tents and other facilities for people left homeless; by late afternoon, 42 people had reportedly been found alive in the ruins.

“This is a dramatic moment when we have to stay calm at all costs, stand together and face this blow... and we will get through this situation,” Albanian prime minister Edi Rama wrote on Facebook on Tuesday morning.

“The search will continue with patience and care ... and in a few hours special teams from Kosovo, Italy, Greece, France, Turkey, Serbia and Montenegro will join us,” he added later in the day.

“But the relief felt over any life saved does not lessen the pain felt for lives lost or our huge sympathy for families who weep for those they have lost.”

Other nearby states including Romania, Croatia and North Macedonia also dispatched rescue crews and equipment to Albania, while countries further afield such as Germany, Hungary and Estonia offered to send assistance.

EU foreign policy chief Federica Mogherini said the bloc sent “deep condolences” to Albanians and “stands in solidarity with Albania and is ready to offer assistance...and has been in continuous contact with Albania’s civil protection authorities.”

The quake was felt in several Balkan states and across the Adriatic Sea in Italy, and hours later a 5.4 magnitude tremor hit Bosnia; throughout the day, smaller after-shocks continued to rattle Albania and increase the danger of rescue work.

Albanian defence minister Olta Xhacka said the emergency crews faced “extremely difficult” conditions and “have to work slowly because there is a high risk of further collapse, endangering not only...those trapped but the rescuers themselves.”

A 5.6 magnitude earthquake struck Tirana in September, damaging hundreds of buildings. The impact of frequent seismic activity in one of Europe’s poorest states is compounded by the low quality and haphazard nature of much of its urban development in recent decades.