Guests were dancing to drums when authorities made the raid Monday in Peshawar city, police official Javed Khan said.

The bride and many of the guests are transgender, meaning they are biologically male but present themselves as female in their daily lives.

"It falls under same-sex marriage, which is not allowed under our law," Khan said.

Homosexuality is a taboo subject in Pakistan, and it is extremely rare to hear of a gay wedding.

There are no official figures for the number of transgender people in Pakistan. Known as khusra, they live on the edges of society and are frequently harassed by police.

Despite the discrimination, Pakistan's Islamic society tolerates them as dancers at festivals and weddings, where men and women are segregated and khusra are seen as bridging the gap. Many also work as prostitutes.

Khan said the groom, businessman Iqbal Khan, and his bride, whose formal name is Kashif but goes by Rani, appeared in court Tuesday along with the 43 guests.

The court ruled that the couple and the guests would remain in police custody while investigators record their statements and gather details, he said.