Stephen Fry attempted suicide while filming a documentary about what it means to be gay in different parts of the world, it has been revealed.

During the making of a documentary for the BBC the TV personality and author met a range of people promoting gay rights, but also challenged those who oppose them, including United States campaigners claiming to be able to cure homosexuality.

He visited Russia, America and Uganda for the series exploring how the lives of men and women in different communities have been impacted by their sexuality.

Download the new Independent Premium app Sharing the full story, not just the headlines

Fry revealed yesterday that during the making of this film last year he took an overdose of pills of and alcohol while alone in a hotel room.

The TV personality, actor and author was saved when his producer on the film found him unconscious and got him appropriate medical help.

Fry, who said he broke four ribs and was unconscious after convulsions related to the overdose incident, said: "It was a close-run thing. And, fortunately, the producer I was filming with at the time came into the hotel room and I was found in a sort of unconscious state and taken back to England and looked after."

The two-part documentary, which has a working title Stephen Fry - Out There, is due to be screened later this year.

It is part of a string of new documentaries announced by BBC2 which include a revival of the Modern Times series for next year.

Other programmes include a look at crane drivers, London's bus service and the world of weight loss groups.

A one-off programme will examine the Piper Alpha disaster when an explosion on a North Sea oil platform killed 167 men.

The film, to be broadcast 25 years after the event, will include interviews with survivors and reconstructions.

Charlotte Moore, the BBC's commissioning editor for documentaries, said: "We live in astonishing times and the mission is clear - we want the very best film-makers to find and tell stories that will illuminate, provoke and reveal modern Britain in all its staggering variety.

"We want to see the finest directors use the full palette of form and emotion to enlighten, amaze, amuse and challenge the audience. Together this daring range of voices and tones will make Modern Times the beating heart of British documentary."