A British man detained on sexual assault charges in Egypt for what his family say was “a pat on the back” has been freed.

The charges against Tony Camoccio, 51, were dismissed in court for lack of evidence, according to the legal pressure group Detained in Dubai, which represents those jailed in the Middle East on potential miscarriages of justice.

Radha Stirling, head of Detained in Dubai, said: “We are very happy to report that British citizen Tony Camoccio has been released from Egyptian custody after paying approximately £1,000 in bail and related fees. The case has been dismissed for lack of evidence, and Tony will be flying home to the UK on the next available flight from Cairo.”

Camoccio was arrested at airport security in the Egyptian resort town of Hurghada last week. His family maintained that he faced serious accusations, after patting an official on the back after a routine pat-down at a security checkpoint before boarding his flight.

Egyptian officials, including those at Hurghada airport, insisted that Camoccio had made sexual and inappropriate gestures at a police officer, and that CCTV footage of the incident supported their case against him.

While staff at Hurghada airport were unwilling to share the footage when requested to do so by the Guardian, officials insisted that the officer felt he had been harmed and wanted to receive legal recompense.

Egyptian authorities have attempted to combat the widespread problem of sexual harassment in the country, where an estimated 99.3% of Egyptian women and girls reported experiencing sexual harassment in a 2013 UN study.

Camoccio’s case has also shone a spotlight on Egypt’s legal system, often criticised by observers for its lack of transparency and due process, especially for Egyptian citizens.

The World Justice Project’s rule of law index ranks Egypt’s judicial system the lowest out of all countries in the region, and 121 out of 126 countries worldwide. The Egyptian judiciary is considered independent but co-opted by state interests, often used as a tool to bludgeon the government’s political opponents or enact mass incarcerations without objective merit.

Egypt holds an estimated 60,000 political prisoners, and the threat of prison has been used to intimidate even the mildest critics. American citizen Mustafa Kassem died in a Cairo prison in January after a prologued hunger strike in protest at his treatment.

Stirling said international attention on Camoccio’s case was the deciding factor. She said: “While the charges were clearly without merit, we have to emphasise that had British authorities and the international press not paid attention to this case, there is no reason to believe that Tony would be a free man today.

“As is so often the case for foreigners in the region, unless an international spotlight is shone on their plight, they have no guarantee of safe resolutions when suffering in obscurity.”

Camoccio said: “I’m very excited to be heading home and can’t wait to see all of my family and rest after the past week’s events. I’m very thankful to everyone for their support, my friends and family, my lawyer, Elezab Ali Elezab, John Kenny from the consulate, and Radha Stirling, who have done their best to get me home.”