Article 354 of the Federal Penal Code states, "Whoever commits rape on a female or sodomy with a male shall be punished by death." While English translations of the Arabic text are in some dispute, it is generally felt that this is a prohibition against rape, and possibly consensual sodomy.
The Federal Penal Code does not replace the legal system of each emirate, unless it is contrary to the federal law, and thus Sharia law remains in place. Hence a person could be charged on this federal penal code, or under the national penal code.
Article 80 of the Abu Dhabi Penal Code makes sodomy punishable with imprisonment of up to 14 years.
Article 177 of the Penal Code of Dubai imposes imprisonment of up to 10 years on consensual sodomy. In 2005 police raided a private party, and arrested over a dozen men for the crime of homosexuality, cross-dressing and initially an Interior Ministry worker told the press that people convicted of sodomy should be given hormone treatments as a "cure", although the Dubai government quickly retracted the statement , and instead suggested that such treatments might be made optional, by the court, to reduce the prison sentences of the convicted men.
Eleven of the men arrested were sentenced to five year prison sentences, while another fifteen men were still waiting for their sentence The court did not make any mention of hormone treatments, although some news reports suggest that some of the convicted men are being given some type of psychiatric testing. The private party was often described as a "gay wedding", and one of the arresting police officers was subsequently investigated for spreading the pictures he had taken of the raid around on his cell phone