Two Myanmar migrant workers on death row for the brutal murder of a pair of British backpackers in Thailand have had their sentences commuted to life imprisonment following a mass royal pardon.

The men's lawyer Nadthasiri Bergman said the pardon decree -- which was published Friday and applies to all inmates on death row -- was "effective immediately".

Zaw Lin and Win Zaw Tun were found guilty of the rape and murder of Hannah Witheridge, 23, and of killing David Miller, 24, after their battered bodies were found on a beach on the southern resort island of Koh Tao in September 2014.

But defence lawyers have said the evidence used to convict the two men -- who are both from Myanmar's impoverished Rakhine state -- was unreliable and alleged that confessions by the pair were obtained under duress.

"I can't find words to express how thankful we are," Ye Zaw Tun, a brother of Win Zaw Tun, told AFP on Saturday following the decree.

"We knew this case was totally unfair, and we sometimes feel bitterness, but we want to say thanks for the royal pardon."

Zaw Lin (left) and Win Zaw Tun (right) were found guilty of the rape and murder of Hannah Witheridge and of killing David Miller
Zaw Lin (left) and Win Zaw Tun (right) were found guilty of the rape and murder of Hannah Witheridge and of killing David Miller AFP / Mladen ANTONOV

A commutation of their sentence had been the pair's only remaining hope after their final appeal failed last year, with Thailand's top court ruling the evidence against them was clear.

The case triggered a strong reaction from Myanmar, where many felt the two men had been given an unfair trial as low-paid migrant workers -- an integral part of Thailand's workforce -- are often regarded with contempt by its public.

The police were accused of buckling under pressure to solve a crime that attracted worldwide attention.

Defence lawyers claimed authorities mishandled DNA related to the case and did not allow independent analysis of the samples.

Win Zaw Tun's brother said the men were in good health in prison but called for them to be "immediately released".

The royal pardon comes as Thailand is rocked by near-daily anti-government demonstrations by student-led groups.