Dustin Lance Black, who wrote the screenplay for Milk, the biopic of gay rights campaigner Harvey Milk, has apologised after leaked photographs showed him having unprotected sex with another man.

The three-year-old photos were released by photo agency Starzlife and show Black, an outspoken safe-sex advocate, and his boyfriend at the time engaging in a number of sexual practices without a condom.

It is alleged that a sex tape of the Oscar-winning writer and director is also up for sale.

In a statement, Black said: “It is unfortunate that individuals and other outside parties are trying to profit from material which is clearly private. I have had the privilege to speak to people across the country, both gay and straight, on a number of critical issues including safe sex.

“More important than the embarrassment of this incident is the misleading message these images send. I apologise and cannot emphasise enough the importance of responsible sexual practices.”

Black’s lawyers are said to be taking legal action to prevent further distribution of the images.