Benedict Cumberbatch has officiated at a same-sex civil partnership for one of his closest friends.

The British actor, slated to portray the gay mathematician Alan Turing in an upcoming biopic, helped conduct the civil partnership for one of his closest friends in Ibiza last Saturday.

Cumberbatch told New York magazine: “It’s a very private, lovely thing to be asked to do.

“Of course, I’m going to make a joke after it, ‘I do weddings. Next will be children’s parties and bat mitzvahs,’ if it goes well. It’s a mainly Jewish and gay audience, so hopefully they will be lenient towards me.”

Among the guests attending the ceremony was writer and journalist Julie Burchill, who was widely condemned in January after publishing a transphobic article for the Observer which stated that trans people were “a bunch of dicks in chicks’ clothing.”

Burchill is reported to have described the ceremony as a great occasion and a “blast.”

She said: “The hotel was lush, the bridegrooms were beautiful, and the man who married them (to each other) was Benedict Cumberbatch — so yes, it was quite a blast.”

Cumberbatch flew into Ibiza on Friday, which was his 37th birthday. On the same day, he also discovered he had been nominated for an Emmy for his performance in ‘Parade’s End’.

Speaking about his nomination, he said: “My friend doesn’t even know this. I’ve been so busy trying to get luggage from one airport to another, I haven’t even gotten around to telling him. I managed to tell my mum and dad, who are over the moon.”

Last year it was reported that Cumberbatch is also set to depict the legendary gay manager Brian Epstein, famously dubbed “the fifth Beatle” by Sir Paul McCartney, in an upcoming film.

The Alan Turing biopic ‘The Imitation Game’, also starring Cumberbatch, was in June criticised by Turing’s biographer for downplaying the computer genius’s gay identity, exaggerating instead his love affair with a woman.