David Cameron was appointed prime minister by the queen this evening, five days after last week’s general election.

He is expected to be the most gay-friendly Conservative prime minister in history, although there are still many in his party that are considered by some to be homophobic.

Support from the LGBT community for the Conservatives dropped from 39 percent in 2009 to six percent at the time of the election. The Liberal Democrats enjoyed 57 per cent support.

The new team at Downing Street told PinkNews.co.uk that he will make a new appeal to the gay community once in office and a source indicated that the coalition with the more gay-friendly Liberal Democrats will help.

He went to Buckingham Palace with wife Samantha shortly after Gordon Brown tendered his resignation and spent 20 minutes with the Queen.

Mr Cameron, 43, becomes Britain’s youngest prime minister since the 19th century.

Mr Brown announced his resignation at 7.20pm this evening, wishing the new prime minister well.

In a speech after he returned to Downing Street, Mr Cameron confirmed he would lead a coalition government with the Liberal Democrats.

Any deal must still be put to the Liberal Democrats’ federal executive at a meeting tonight. The deal may include ministerial posts for Liberal Democrats and some commentators believe Nick Clegg may be installed as deputy prime minister.

In the speech, Mr Cameron paid tribute to the outgoing Labour administration, saying it had made Britain “more open at home, more compassionate abroad”.

But he said Britain had “deep and serious” problems, such as the deficit and the political system.

Of the coalition between his party and the Liberal Democrats, he said he and Liberal Democrat leader Mr Clegg wanted to “put aside party differences” and work together for the good of the nation.

He repeated the words “freedom, fairness and responsibility” as Conservative objectives.

In the last year, Mr Cameron’s voting record on gay equality has been closely scrutinised.

In 2002, he voted to restrict marriage to married couples and bar gay couples from adopting children.

A year later, he voted against the repeal of Section 28, which banned the promotion of homosexuality by local authorities.

But in the last few years, he has undergone a striking conversion, giving no fewer than three interviews to the pink press in the run-up to the election.

Mr Cameron says he now believes gay couples should be allowed to adopt, that the blood donation ban on gay men should be lifted and that schools must tackle homophobic bullying.

Earlier this year, he was accused of slipping up over his party’s votes on gay issues.

He was asked in an interview shown on Channel 4 News why he did not force his MPs and MEPs to vote for gay equality measures, rather than allowing free votes.

Mr Cameron appeared to have been caught unaware by the question and stumbled over his answer, prompting interviewer Martin Popplewell to press him until he asked for the interview to be halted.

Furthermore, his party suffered more damage during the election campaign, as four candidates, including two members of his shadow cabinet, made controversial remarks about homosexuality.

Shadow home secretary Chris Grayling had to apologise after saying he agreed bed and breakfast owners should be allowed to bar gay couples, while shadow defence minister Julian Lewis claimed that gay sex was more dangerous than serving in the Army.

Mr Cameron sacked Scottish Conservative candidate Phillip Lardner for calling homosexuality “not normal”, but took no action when claims surfaced about unsuccessful candidate Philippa Stroud founded a church that believed gays were possessed by demons.

Writing for PinkNews.co.uk last month, Mr Cameron said he believed “heart and soul in equality” but was aware that many in the gay community remain wary of the party.

He promised our readers that if elected, he would change the law to allow all historical convictions for homosexual sex to be treated as spent.