Three British men in Dubai who claimed they were tortured in custody have been found guilty of possessing drugs and each sentenced to four years in prison.

Grant Cameron and Suneet Jeerh, both 25, and Karl Williams, 26, were jailed for possessing a quantity of a synthetic cannabis known as "spice".

The men, from London, were on holiday in the Gulf state in July 2012 when they were arrested after police found the drug in their car.

They claimed they were tortured by police following their arrest, alleging they were given electric shocks and had guns held to their heads.

Williams described having a towel put on his face by police and having electric shocks on his testicles, according to Reprieve, the human rights charity.

On Monday morning, Downing Street confirmed that David Cameron would raise the torture allegations with the United Arab Emirates's head of state during an official two-day visit that begins on Tuesday.

The three Londoners claim they signed documents in Arabic – a language none of them understands – following their arrests because they were forced to at the point of a gun.

The men had their first trial hearing in February after seven months in custody. They denied charges of "consumption and possession with intent to distribute" and were found not guilty of the charge of distributing drugs.

The alleged torture, which the police deny, took place in the desert, where the men were initially taken after their arrest, and subsequently in hotel rooms, it was claimed.

Grant Cameron's mother, Tracy, told the Press Association: "Grant had only been in the country for four days when he was arrested.

"For 45 minutes they were Tasered, beaten around the head and handcuffed before they were taken back to the hotel where Grant was staying. They were put in separate rooms and had guns held to their heads. They were told they would be killed and told they would never see their families again. Grant feigned being diabetic, which seemed to calm things down a bit."

In a letter to Reprieve, Cameron has said he will use a state visit by the president of the UAE this week to raise his concerns about the case and the two men are expected to meet on Thursday.

Cameron wrote: "The UK government takes all allegations of mistreatment very seriously.

"We continue to press for evidence for a full, impartial and independent investigation into the allegations. The absence of an independent medical examination remains a concern."

"During the state visit of His Highness Sheikh Khalifa bin Zayed Al Nahyan there will be opportunities to raise a wide range of issues including concerns about this and other consular cases," he said.

During a briefing to journalists on Monday, a No 10 spokesperson said as part of the visit "there will be an opportunity to raise a wide range of issues, including concerns about these cases. There are no no-go areas."

After the sentencing, a Reprieve investigator, Kate Higham, said: "The central fact of this case remains that these men were tortured by police, but there has been no proper investigation into their abuse. The only reasonable course of action for the UAE authorities now is to grant these men clemency, release them and allow them to return home to their families.

"David Cameron must push for this when UAE president Sheikh Khalifa arrives on a state visit tomorrow. It also remains essential that the UAE conduct an impartial investigation into these men's torture, and ensure it is never allowed to happen again."

The Foreign and Commonwealth Office (FCO) said the UAE had made a partial response to its own call for a full, independent and impartial inquiry into the torture allegations but concerns remained about the UAE approach.

An FCO official said: "The sentence is a matter for the UAE judicial system. We remain concerned by the allegations of mistreatment on arrest and continue to raise these with the UAE authorities. The FCO takes all allegations of mistreatment and torture extremely seriously, and acts with a sense of urgency in all cases. We have been providing consular assistance to three British nationals detained in the UAE since July 2012, and are aware of their allegations of mistreatment.

"We have raised, and continue to raise, these allegations at the most senior levels in person and through diplomatic channels, including through ministers. We requested a full impartial investigation into the allegations and have now received some details of the UAE investigation. However, we are concerned about aspects of this and are formally raising these with the Emirati authorities. Ministers will also be raising our concerns during the state visit."