Tony Blair’s former attorney general, Lord Goldsmith, won’t be allowed to enter Singapore in order to represent a same-sex couple in a gay rights case, the country’s High Court has ruled.

Section 377A of the Singapore penal code makes sex between two men punishable by up to two years, although it is rarely enforced.

Oral and anal sex between consenting heterosexual women and lesbians were sanctioned after the penal code was reviewed in 2007 – however the ban remains in place for men who have sex with men

Lord Goldsmith, of the international legal firm Debevoise & Plimpton, has been helping Singaporean gay couple Gary Lim and Kenneth Chee on a pro-bono basis in their campaign to overturn Section 377A.

Singapore’s High Court rejected their case in April and insisted it was a matter for Parliament.

It was also rejected by the country’s Court of Appeal.

Lord Goldsmith wanted to travel to Singapore in order to represent Mr Lim and Mr Chee in person – but this has been rejected by Singapore’s High Court because of “statutory restrictions on the admission of foreign counsel.”

The Court recognised that Lord Goldsmith was “well qualified to take on the Appellants’ case” and has “extensive experience” in constitutional, public and human rights cases, with both “breadth and depth” of experience – yet permission was still refused.

Lord Goldsmith’s legal firm, Debevoise & Plimpton, released a statement saying:

Whilst disappointed that the full application to admit Lord Goldsmith QC was not accepted, we are pleased to have already contributed significantly to the written case of Mr Lim and Mr Chee including developing new arguments not deployed in the first instance court. As the Singapore court decision makes clear it is the written materials rather than the oral submissions which are most significant and enable “advocates in Singapore most fully [to] communicate their arguments to the appellate court judges.”  We are also gratified that the Court recognizes that Lord Goldsmith was “well qualified to take on the Appellants’ case” and has “extensive experience” in constitutional, public and human rights cases, with both “breadth and depth” of experience.

In May, Lord Goldsmith urged Belize to reform its criminal code as it currently outlaws same-sex sexual activity.