Three Mexican brothers convicted of drug trafficking after spending four years in a Malaysian prison were sentenced Thursday to death by hanging.

The trial of Luis Alfonso, Jose Regino, and Simon Gonzalez Villarreal, ages 47, 36 and 33, respectively, and two co-defendants began more than a year ago.

"You have been sentenced to die by hanging," the judge told the Mexican brothers, a Singaporean man and a Malaysian national at the end of a nearly two-hour-long hearing in which he issued his conclusions and read sections of the penal code pertaining to drug trafficking.

The three brothers wore grim expressions during the sentencing, although Simon wept after the court interpreter informed the men of the judge's decision.

The five men were arrested by police in a raid that resulted in the seizure of 29 kilos (64 pounds) of methamphetamines worth 44 million ringgit ($15 million).

Malaysian law makes the possession and trafficking of more than 15 grams of heroin or cocaine, or 200 grams of marijuana, a capital offense.

Defense attorney Kitson Foong said after the sentencing that the judge had erred and that the convicted men would lodge an appeal, a process he said would take between 12 and 18 months.

Even if the conviction is upheld by the appellate court, the defendants would still have recourse to the Federal Court of Malaysia, the Asian country's highest tribunal.

The magistrate who convicted the men Thursday, Mohamed Zawawi, is known as "the hanging judge" because of the numerous death sentences he has handed down.

Zawawi said prosecutors conclusively showed the three brothers and the other two defendants had manufactured narcotics, noting that traces of drug chemicals were detected on the clothes they were wearing on March 4, 2008, the day of their arrest.

The three Mexicans have maintained their innocence and testified that they were merely cleaning the drug-making factory where they were detained during a police raid.

The youngest of the brothers, who contracted tuberculosis in January and was wearing a mask at the hearing, said his health is better but that he is "very thin" due to a lack of proper nutrition.

The audience at the hearing included two Mexican Embassy officials, the relatives of the Malaysian and Singaporean defendants - Lee Bonh Sia and Lim Hung Wan -, journalists and about 10 police.

The defense contended there were discrepancies in the police reports about the color and chemical composition of the drugs and chemical precursors the Mexicans allegedly had in their possession.

Lawyers for the five men also cited the disappearance of some of the drugs after they were taken into custody.

The defense team plans to challenge the DNA evidence that showed the traces of drug chemicals on the convicted men's clothing, Kitson said, noting that courts in Britain or Australia would have considered it inadmissible due to the scant reliability of the method used.

"We're going to appeal because the chain of evidence is not intact," the attorney said.

The Mexican brothers are from Sinaloa state, the birthplace of the first generation of high-profile Mexican drug traffickers, including Joaquin "El Chapo" Guzman, the fugitive boss of the Sinaloa cartel, but they have no prior criminal convictions.