Martin Rees is a man of many parts. He is the 59th President of the Royal Society – Britain's "top scientist" – the Master of Trinity College, Cambridge, and the Astronomer Royal, the duties of which he declares to be so "exiguous one could perform them posthumously".

Baron Rees of Ludlow, a title he says is useful in dealing with fusty officialdom, is also a leading cosmologist, a popular science writer and a futurologist who believes that human civilisation has only a 50:50 chance of surviving the 21st century.

Martin Rees the human being is also one of those rare examples of someone with a brilliant mind who can talk to lesser mortals without making them feel as if they suffer from a mental deficiency.

His five-year tenure as head of the Royal Society, the UK's national academy of sciences, comes to an end this year. During that time he has presided over the society's 350th anniversary celebrations and a rare "convocation" of fellows – an event that takes place just once every half-century.

Lord Rees, 68, is a slight, wiry man with a booming three-dimensional voice that fills the biggest rooms. He is renowned professionally for his skills in cosmology and mathematics. A contemporary of Stephen Hawking, he believes that our Universe may be just one of many, and that even the one that we know about could actually be a computer simulation devised by a race of super-intelligent aliens – although he accepts that this is unlikely.

As President of the Royal Society, Rees has become the figurehead of British science and he has learnt that his pronouncements carry more political weight than when he was mere Sir Martin Rees, the Astronomer Royal and part-time science author. He agreed to a final interview before he retires with this in mind, saying that he would have to be careful with his choice of words if he was not actually in charge of writing them.

"If it was a straight question and answer, I'd be less circumspect," he said, portraying a man who appears to have had some bruising encounters with the media during the past five years, not least the embarrassing episode of his former director of education, Michael Reiss, who had to resign in 2008 after suggesting that creationism should be discussed in biology lessons.

Lord Rees was this year's Reith lecturer and, as expected from one of Britain's leading intellectuals (he is one of the 24 distinguished members of the Order of Merit), his four talks covered immense ground. He tackled the subjects of alien life, climate change, overpopulation, the possibility of lethal pandemics, the idea of science as "organised sceptism", and whether schoolchildren in Britain are given the best opportunities to take up and study the science underpinning their natural inquisitiveness.

"It is depressing that a tiny, tiny fraction of primary school teachers have any higher education qualification with a scientific component. There is one such teacher for every three primary schools, so most primary schools haven't a single teacher whose got anywhere near degree level in science," Lord Rees told The Independent.

"This is a pity because most children have an intrinsic interest in science, whether it is tadpoles, dinosaurs or space. One would hope that that transitions into an interest in science at the secondary school stage but we know of course that it doesn't always happen," he said.

"This is one of the most glaring problems. It means that not only does a substantial proportion of young people not get a chance of qualifying for a good university, but also of course it means that it impacts on the rest of the population. The lack of skilled people is one consequence of this."

Lord Rees, the former public schoolboy who has been part of an intellectual elite for all of his working life, is nevertheless keen to see the removal of the barriers to social mobility that continue to shape British society. He was part of Alan Milburn's Panel on Fair Access to the Professions and saw for himself how many careers, such as law and banking, are almost a closed shop for children from disadvantaged backgrounds without the right contacts.

"In the case of science, there is a fairly level playing field once people get the qualifications to be admitted to a good university, but the most serious inequalities happen before that because a large proportion of young people don't get exposed to high-quality, specialised science teachers and therefore don't get a fair chance of doing good A-level courses," he said.

Lord Rees, a life-long supporter of the Labour Party, describes himself as a technological optimist but a political pessimist. He truly believes that this century may easily turn out to be humanity's last if we don't make the right kind of political decisions that will save us from environmental destruction, climate change and an ever-expanding human population.

"I'm a technological optimist in that I do believe that technology will provide solutions that will allow the world in 2050 to support 9 billion people at an acceptable standard of living. But I'm a political pessimist in that I am concerned about whether the science will be appropriately applied," he said.

One issue that adds to his depression is the fact that the UN's Millennium Development Goals – the eight anti-poverty goals to be achieved by 2015 – are now in themselves considered to be almost unachievable.

Climate change, and what the world needs to do to avert the worst predictions, is "doubly difficult" he said because, unlike the Millennium Development Goals, the threats are not immediately obvious to most people. "In the case of climate change, the threat is long term and diffuse and requires broad international action for the benefit of people decades in the future," he said. "And in politics, the urgent always trumps the important and that is what makes it a very difficult and challenging issue," he added.

The leak of emails from the University of East Anglia last November, designed to destabilise the climate conference in Copenhagen, has done nothing to undermine the science, he said. They may have shown how human scientists can be in the private conversations, but nothing has come out that changes the conclusions of the scientific report of the Intergovernmental Panel on Climate Change, Lord Rees said.

"The important point is that nothing has happened in the last year that really changed the conclusions of volume 1 of the IPCC report. But of course there is still an uncertainty in the projection [of temperature increases] because there is still uncertainty in the science," he said. He is pessimistic about the political will to turn round the rising levels of carbon dioxide in the atmosphere, at least in the short term of the next 10 years or so.

"But if we look on a 50-year timescale, the world would have moved towards where we are more sparing in energy use – the world is not all going to live like present-day Americans," he said.

On the need to confront the big environmental problems facing us in the 21st century, he parts company with his friend and colleague Stephen Hawking, who famously once said that humans will have to colonise distant planets if they are to survive. "I think that's an an ill-thought through statement and we have to bear in mind that there is nowhere we know about in our own Solar System that is even as hospitable as the top of Everest or the South Pole. The problems of the Earth must be solved here on the Earth and we must not divert attention from that necessity," Lord Rees said. He is equally scathing about Hawking's more recent comments about there being no need for God in order to explain creation. "Stephen Hawking is a remarkable person whom I've know for 40 years and for that reason any oracular statement he makes gets exaggerated publicity. I know Stephen Hawking well enough to know that he has read very little philosophy and even less theology, so I don't think we should attach any weight to his views on this topic," he said.

Unlike many of the Fellows of the Royal Society he has presided over in the past five years, Lord Rees is not a militant atheist who goes out of his way to insult people of belief – Richard Dawkins once called him "a compliant quisling" for his tolerance of religion.

"I would support peaceful co-existence between religion and science because they concern different domains," Lord Rees said. "Anyone who takes theology seriously knows that it's not a matter of using it to explain things that scientists are mystified by."

His next popular science book is about these things that science still cannot explain, such as the origin of life on Earth and the scientific nature of human consciousness. This, he insisted, is what science is really about, and why it has the power to touch everyone of every culture.