It sounds like a scenario from a fantasy dinner party: the most powerful man on the planet interviewing one of the world’s most beloved naturalists about his life story, about climate change and the future of life on Earth.

But in May, it has emerged, this encounter did happen, when Barack Obama invited Sir David Attenborough to the White House for a televised discussion – in which he, the US president, was to ask the questions of the broadcaster, not the other way round.

In the interview, to be broadcast simultaneously in the UK and US on BBC1 and BBC America on Sunday, Obama tells Attenborough: “I’ve been a huge admirer of your work for a very long time … you’ve been a great educator as well as a great naturalist.”

But it is Attenborough, on the day in which he marked his 89th birthday, who poses the most probing questions of their encounter, asking the president why he cannot show a commitment to tackling climate change in the same way previous presidents had strived to put people on the moon.

Challenged by the naturalist, Obama says: “We’re not moving as fast as we need to and part of what I know from watching your programmes, and all the great work you’ve done, is that these ecosystems are all interconnected. If just one country is doing the right thing but other countries are not, then we’re not going to solve the problem, we’re going to have to have a global solution to this.

“What we’re seeing are global trends that depends on the entire world working together, and sadly we haven’t made as much progress as we need to on climate change.”

Attenborough says that being invited to meet the president on his 89th birthday – the first time in his long career he had ever visited the White House – had been “a considerable surprise”. He says he found the president “friendly, hospitable and genuine”.

The president tells Attenborough that he grew up watching his programmes. Attenborough presented his first natural history programme for the BBC in 1954. The pair discuss the broadcaster’s career, his recent trip to dive in the Great Barrier Reef, (which he has called “the most magical thing” he has ever seen), and what he believes needs to be done about pressing issues such as the rising population, climate change and renewable energy.

“I believe [if] we find ways of generating and storing power from renewable resources we will make the problem with oil and coal disappear,” Attenborough tells the president, “because economically, we’ll wish to use these other methods. If we do that, a huge step will be taken in solving the problems of the Earth. I think what’s required is an understanding and a gut feeling that the natural world is part of your inheritance. This is the only planet we’ve got and we’ve got to protect it. And people do feel that, deeply and instinctively, it is after all where you go in moments of celebration and in moments of grief.”

Obama, in turn, talks about his paternal roots in Kenya as well as his childhood in Hawaii and Indonesia, and how travelling across the world throughout his life had shaped his thoughts on the environment.

Global Apollo programme seeks to make clean energy cheaper than coal Read more

Attenborough has previously said he believed Obama was “very much in favour of tackling climate change … [but] of course, as we also know, he is coming to the end of his last presidency”.

The broadcaster recently helped launch the Global Apollo Programme, which aims to double the amount of money being spent on research and development of renewable energy, calling on world leaders to spend 0.02% of GDP on developing clean-energy technologies.