TIRANA, Albania — The search-and-rescue operation for earthquake survivors in Albania has ended, the prime minister said Saturday, with the death toll at 51 and no more bodies believed to be in the ruins.

The 6.4-magnitude quake, the country’s deadliest ever, struck on Tuesday, and was centered slightly west of the capital, Tirana. Hundreds of aftershocks, some with a magnitude of more than 5.0, have shaken already damaged buildings and terrified residents.

Prime Minister Edi Rama said preliminary figures showed that more than 1,465 buildings in the capital, Tirana, and about 900 in nearby Durres had been seriously damaged by the quake. About 2,000 people were injured.

The 51st victim was a 20-year-old woman who died on Saturday. She had been struck on the head by falling bricks in Tirana. Most fatalities occurred in the coastal city of Durres and the nearby town of Thumane.