A Thai court on Thursday sentenced two Myanmar migrants to death for murdering two British backpackers found bludgeoned on a resort island last year, a gruesome crime that focused global attention on tourist safety and police conduct in the country.

The court ruled there was sufficient evidence to convict Win Zaw Htun and Zaw Lin, both 22, of killing David Miller, 24, and raping then murdering Hannah Witheridege, 23, last year on the island of Koh Tao.

British tourists David Miller, 24, and 23-year-old Hannah Witheridge, were killed with a garden tool after a beach party early Sept. 15 in Thailand. Courtesy of the Miller and Witheridge

Andy Hall, an activist working with the defense team, said the two were found guilty on all counts. They face the death penalty but are expected to appeal.

Miller and Witheridge's battered bodies were found Sept. 15, 2014, on the rocky shores of Koh Tao, an island in the Gulf of Thailand known for its white sand beaches and scuba diving. Autopsies showed that the young backpackers, who met on the island while staying at the same hotel, suffered severe head wounds and that Witheridge had been raped.

The killings tarnished the image of Thailand's tourism industry, which was already struggling to recover after the army staged a coup just months earlier in May 2014 and then imposed martial law.

From the start, the case raised questions about police competence. Investigators faced a variety of criticism, starting with their failure to secure the crime scene, and then for releasing several names and pictures of suspects who turned out to be innocent.

After Britain's Foreign Office expressed concern to Thai authorities about the way the investigation was conducted, British police were allowed to observe the case assembled by their Thai counterparts.

Under intense pressure to solve the case, police carried out DNA tests on more than 200 people on Koh Tao.

The two migrants were arrested about two weeks after the murders. Police said the pair had confessed to the killings and that DNA samples linked them to the crimes. Both men later retracted their confessions, saying they had been coerced by the police. Police have denied the accusations.

One of the defendants, Win Zaw Htun, testified that he was tortured, beaten and threatened so he would confess. He told the court that police handcuffed him naked, took pictures of him, "kicked him in the back, punched him, slapped him, threatened to tie him to a rock and drop him in the sea," according to defense lawyer Nakhon Chompuchat.

Myanmar migrants Win Zaw Htun, front, and Zaw Lin, both 22, arrive at court in Koh Samui, Thailand, Thursday, Dec. 24, 2015. They are accused in the murders of two British backpackers, David Miller, 24, and Hannah Witheridge, 23, last year on the resort island of Koh Tao. Wason Wanichakorn / AP

Zaw Lin, the other defendant, testified that he was blindfolded, beaten on his chest and told he would be killed if he didn't admit to the charges, Nakhon said, adding, "He also said he was constantly suffocated by a plastic bag that was put over his head until he passed out."

The case hinged on DNA evidence that police and prosecutors say link the suspects to the crime but the defense says is flawed.

The defense says that the DNA found on a garden hoe police say was the murder weapon does not belong to the defendants. An expert witness testified that the hoe contained DNA from two males, but not the suspects.

"The prosecution case is marked by an absence of significant evidence needed to prove the guilt of the accused for crimes they are charged with," the defense team said in a statement released this week.

About 2.5 million people from Myanmar work in Thailand, most as domestic servants or in low-skilled manual jobs such as construction, fisheries or the garment sector. Migrants are often abused and mistreated without the safeguard of rights held by Thai citizens.