Albania's prime minister declared victory in parliamentary elections on Tuesday and claimed a record third term in office, but the opposition has refused to accept the result.

Edi Rama held a victory rally in front of thousands of supporters after the election commission said his Socialists were on course for 74 seats in the 140-seat parliament following Sunday's vote.

The commission said the opposition coalition was trailing with a projected 59 seats, but Democrat Party chief Lulzim Basha said there had been an "electoral massacre".

The two leaders have a deep personal enmity and much of the campaign was spent with them trading barbs, but they had made conciliatory statements on voting day.

The US and EU were watching the election closely -- with Albania pushing to open EU membership talks -- and had urged all sides to respect the result while praising the organisation of the ballot.

But the losing side regularly disputes the outcome of elections in the Balkan country of 2.8 million people -- the last vote in 2017 prompted street protests and some opposition MPs boycotted parliament.

Edi Rama is the first Albanian leader to win three mandates
Edi Rama is the first Albanian leader to win three mandates AFP / Gent SHKULLAKU

"These elections had nothing to do with democracy, we entered this battle with a regime that did everything to destroy an honest election campaign," said Basha in front of a crowd of party activists.

He alleged massive voting fraud and said his party was "not going to surrender".

Prosecutors said 33 cases of corruption relating to the election had been opened, but did not specify which parties were involved.

Rama, who has been in power since 2013, was celebrating becoming the first Albanian leader to win three mandates.

"We broke the record. It was a historic record. Thank you for placing your faith in us to lead you for another four years," he told supporters in central Tirana.

Albania's Prime Minister Edi Rama is the country's first leader to win three mandates
Albania's Prime Minister Edi Rama is the country's first leader to win three mandates AFP / Gent SHKULLAKU

Rama, an artist and former basketball player, continued the spirit of conciliation during his victory rally, calling on opposition parties to work with him to make Albania a "Balkan champion" in tourism.

"I will be the prime minister of all Albanians," he told the crowd, who chanted "victory, victory".

During the campaign, Rama promised to accelerate the rollout of coronavirus vaccines and complete reconstruction from a 2019 earthquake that left thousands homeless.

But the focal point of the campaign was the clash of personalities between Rama, Basha and current President Ilir Meta.

Rama accused his two rivals of having no policies, only an obsession with getting rid of him. They accused him of vote-rigging and corruption.

Meta, whose wife runs a movement allied to the Democrats that was projected to lose most of its seats, had promised to quit if the Socialists won in a fair vote.

On Tuesday, however, he struck a more neutral tone, urging all parties to show "maturity and composure".

Watchdogs regularly rank Albania as one of the most corrupt countries in Europe, and it is also one of the poorest.

Rama is pushing to transform it into a tourism hub with new airports and better infrastructure, but critics complain of the corruption and worry about environmental damage.

All parties support membership of the EU and the country is overhauling its judicial system and has passed new election laws to meet EU standards.

The bloc agreed last year to open formal talks without setting a date, but praised the reform efforts on Tuesday and said the negotiations should begin "as soon as possible".

"Albania has come a long way on its path towards the European Union, showing persistence in pursuing difficult reforms in the interest of the Albanian people," the bloc said in a statement.