Prime minister David Cameron hosted his second Downing Street reception for the LGBT community on Wednesday night and said the government would continue to pressure African governments on gay rights.

Famous guests at Number 10 included Billie Jean King, Gareth Thomas and Ben Cohen, who mingled with LGBT campaigners, volunteers and community leaders.

Other attendees were G-A-Y founder Jeremy Joseph, Stonewall chief executive Ben Summerskill and Hollyoaks star Kieron Richardson.

After a performance by the London Gay Men’s Chorus, Mr Cameron kicked off his speech with a risqué joke about entertaining two queens in 48 hours – Queen Elizabeth, who visited Downing Street yesterday, and Sir Ian McKellen, who was due to attend the event but did not.

To laughter, he said: “It’s great to have this reception here today. I was just thinking, someone told me that if Sir Ian McKellen was here, I could say I had the Queen and Prince Phillip here for lunch yesterday, Sir Ian [McKellen] today. Who can say they’ve had two of Britain’s most prominent queens over in 48 hours?”

Read the speech below

Addressing the crowd without notes, Mr Cameron said that the government should not be “complacent” about LGBT rights issues, although he said he was proud of work on religious civil partnerships, historic gay sex convictions and a large-scale survey of transgender people.

He called homophobia a “societal problem” and said that the issues of homophobic bullying and homophobia in sport are “interlinked”.

Referring to the government’s controversial decision to retain the 0.7 per cent aid commitment, Mr Cameron said this would have the “spin-off benefit” of allowing ministers to pressure countries on their human rights records.

He said: “I think this is right morally because as a rich country, we should be helping the poorest people in the world.

“But it also has a spin-off benefit of giving us some moral authority in the world to talk to other leaders and governments about our relationship with them and what we expect from them.

“I’m very proud of the fact we [put] huge pressure on the leader of Malawi about an issue in that country but I’m convinced we can do more. We have got the ability to speak to African leaders, African governments, about this issue that I know concerns everyone here tonight. And it concerns me.”

Martina Navratilova was unable to make the event but Mr Cameron read out a message from her.

The tennis star said: “I believe if all the gay men and women came out, the sports world and the world in general would be a lot better off. Athletes today are progressing to unprecedented levels of skill and strength. But homophobia slowly poisons the process and prevents people from realizing their dreams. And as long as prejudice prevails, athletes won’t get their fair due.

“We must ensure that everyone has a voice; we must challenge unacceptable behaviour, and rid the sports world of homophobia and transphobia. Then and only then, will we make sports a welcome place for everyone.”

The prime minister’s speech:

You’re all extraordinarily welcome here at Number 10 Downing Street

I’m just sorry that because of the uncertainty over the weather, that while we’re out, we’re not out in the garden, like we were last year, I’m afraid.

Ever since the government held drought talks, it hasn’t stopped raining.

It’s great to have this reception here today. I was just thinking, someone told me that if Sir Ian McKellen was here, I could say I had the Queen and Prince Phillip here for lunch yesterday, Sir Ian today. Who can say they’ve had two of Britain’s most prominent queens over in 48 hours?

I think we’ve got a lot to celebrate in Britain when it comes to issues for lesbian, gay, bisexual and transgender people. Recently, Britain was named the best place for gay equality in Europe. I don’t think that means we should be complacent.

I think it is a huge testament to the work of the last government and I believe what this government has done as well. It’s great to see politicians from all parties here. But I just want to say one thing that made me very proud in the House of Commons today, it was a Conservative member of parliament who stood up and congratulated the government on the reception for a section of society that wouldn’t have happened years ago. Iain Stewart asked that question. I’m proud he asked that question, I’m proud I was able to answer it, it shows that all organisations can change.

There’s a couple of things the government has done that I think have moved this agenda forward, which I want to mention. The first is actually laying the groundwork for having civil partnerships in religious institutions. I think that is a good step forward and I’m glad that it’s happening. I also think wiping the slate clean for consensual sexual offences for gay men, that is something we promised as a coalition and we have delivered. Another thing is the huge survey that is being carried out on transgender issues.

I think frankly though we have other areas where we could improve. But there are three I just wanted to mention tonight, that I think we should really focus on, not just as a government but as a country.

The first is the issue of homophobia in sport, and I think it’s great that tonight, in Number 10, we’ve got representatives and governing bodies of almost every single sport that I can think of, here signing a charter saying it’s time to put an end to homophobia and trying to give sports stars who want to come out the confidence to come out.

It’s a huge honour to have here in Number 10 Downing Street not just Gareth Thomas, not just Ben Cohen, who is doing great campaigning work, but also a great heroine of mine – and in Wimbledon week, amazing to get her here – Billie Jean King.

But frankly there’s a lot more we need to do. There is an absolutely tiny number of sports personalities who have felt able to come out and we should be doing far more for those who don’t feel comfortable enough to do that. And that links to the second issue that I want to mention and that is the issue of homophobic bullying in schools, which is still a huge problem in our country.

And frankly, the two issues are interlinked because young people need role models and if we don’t have enough role models, enough positive role models, then behaviour won’t change. So I think that while government clearly has a huge role, in making sure we tackle bullying, in making sure headteachers have the powers they need and making sure we address the issue properly, it’s not just a government problem or a legal problem, it’s a societal problem. Sport has a massive influence.

The third issue, where I think we are making progress as a government, and I think an area where we have the ability to make progress, is the fact that gay people can be appallingly treated in other parts of the world, particularly in Africa.

Now, we’ve had to make a lot of difficult decisions as a government and we’ve had to make lots of tough decisions but I’m very proud of the fact, in spite of the fact that it’s not always popular, we have made the difficult, but I believe the right, decision, to maintain a commitment to 0.7 per cent of our national income going in aid to the poorest countries by 2013. It’s a huge commitment for Britain to make, alone in the world. Everywhere is breaking their promises … we are keeping our promises to the poorest people in the world. And I think this is right morally because as a rich country, we should be helping the poorest people in the world.

But it also has a spin-off benefit of giving us some moral authority in the world to talk to other leaders and governments about our relationship with them and what we expect from them. I’m very proud of the fact we [put] huge pressure on the leader of Malawi about an issue in that country but I’m convinced we can do more. We have got the ability to speak to African leaders, African governments, about this issue that I know concerns everyone here tonight. And it concerns me.