The Court of Cassation, the kingdom's highest court, in 2015 confirmed the death sentences but then overturned them after the emergence of a previously undisclosed medical report.
Bahrain's top court has upheld death sentences against two men convicted of murdering a police officer after hearing the case for the second time following allegations of torture in custody.
The two accused - Mohamed Ramadhan and Hussain Moosa, who are members of Muslim Sunni-ruled Bahrain's minority Shiite community - were first sentenced in late 2014.
The Court of Cassation, the kingdom's highest court, in 2015 confirmed the death sentences but then overturned them after the emergence of a previously undisclosed medical report by the interior ministry.
According to the group Human Rights Watch, the report appeared to corroborate claims the detainees had been tortured to force them to confess to fabricated charges.
Refugee footballer Hakeem Al-Araibi, who was locked up in Bangkok after Bahraini officials pursued him over vandalism charges, urged Australia's Foreign Minister Marise Payne to speak out against the sentences.
"As an Australian citizen who would not forget the fight of Australia and all the Australian community to save me from an imminent danger that resembles what these men faced and still facing behind the bars in Bahrain, I would like to ask you to, please condemn, publicly and obviously, sentencing these men to death and demand justice for them and their families," Mr Al-Araibi wrote in a letter addressed to Ms Payne.
An appeals court in January 2020 reinstated the death sentences for Mr Ramadhan and Mr Moosa.
That move was condemned by Amnesty International, which said the trial relied on "confession extracted through torture".
On Monday the top court upheld that verdict, the kingdom's prosecutor said in a statement.
"The Court of Cassation upheld today death sentences against two people in the killing of a police officer and attempt to kill other members of the force in a premeditated ambush using an explosive device in 2014," they said.
Sayed Ahmed Alwadaei, advocacy director of the Bahrain Institute for Rights and Democracy (BIRD) in London, condemned the ruling.
"Today's verdict is yet another dark stain in the struggle for human rights in Bahrain, demonstrating the regime's iron grip over the country's corrupt judiciary," he said in a statement.
"This horrendous injustice could not have happened without the tacit acceptance of Bahrain's western allies."
The two men "have now exhausted legal remedies and are at risk of imminent execution, pending ratification by Bahrainis king," added the statement.
Authorities in the tiny kingdom have cracked down hard on dissent since mass street protests in 2011 demanded an elected prime minister and a constitutional monarchy in Sunni-ruled Bahrain.
Bahrain claimed Iran trained and backed the demonstrators in order to topple the Manama government - an accusation Tehran denies.
The kingdom rejects allegations of human rights violations and denies imposing discriminatory measures against its Shiite citizens.
Mr Al-Araibi was detained at Bangkok airport on November 27 when he arrived in Thailand for his honeymoon with his wife.
The arrest was made after Bahrain issued an Interpol Red Notice for his detention on November 7.
Australia came under fire for passing on the notice to Thai authorities before his arrival.
The Australian Department of Foreign Affairs and Trade was contacted for comment.