Nick Herbert, the shadow environment secretary, has said the Conservative party has seen a “definite change” in its attitudes to gay people.

Speaking on the BBC’s Today programme this morning, Mr Herbert, who is gay, said: “You can’t be a party that is seeking to appeal to the whole country unless you are properly representative of the whole country.

“And that the position that we had been taking in the past towards gay people had been one that appeared to be hostile and that we were wrong.”

In the last year, party leader David Cameron has apologised for Section 28, pledged to tackle homophobic bullying and said he will reward civil partnerships in the same way as marriages.

Mr Herbert continued: “He [Mr Cameron] has also, I think very bravely, made a defence not just of marriage as an institution, but made it quite clear that is in no way judgemental about gay people.

“Actually, he explicitly said in his first party conference speech that when he talked about the commitment between two people, he meant also commitment between a man and a man, and a woman and a woman.”

He added: “I think this has been a rapid conversion but the change is definite.”

Mr Herbert is due to give a speech in Washington this afternoon on how gay people can fit in to conservative politics.

He will be speaking at the Cato Institute with gay commentator and author Andrew Sullivan of the Daily Dish blog and Maggie Gallagher, the president of the anti-gay National Organisation for Marriage.

Mr Herbert is expected to say that if his party wins a majority in the Commons of just one seat, it is likely to have more out gay MPs than the Labour Party.

He will also discuss the decision to allow gays to serve openly in the British military, the importance of allowing gay couples to adopt and will criticise Labour to attacking his party’s gay credentials.

Since Mr Cameron apologised for Section 28, some members of the Labour Party have attacked the Tories, claiming their views have not changed.

In July, culture minister Ben Bradshaw said that a “deep strain of homophobia” existed on the Tory benches, to which gay Tory MP Alan Duncan responded that it was the Labour Party who were “actually the nasty party”.

Mr Herbert will say: “In the UK, all three major political parties are now assuring gay people that it’s safe to vote for them

“Typically, far from taking pleasure in this new consensus, the Left has greeted it with dismay. For over a decade they have sought to build a client state, where groups are beholden to their generosity. And now they want to open up ‘clear pink water’ between themselves and the Conservative Party.

“There’s an election coming, and it suits our opponents to argue that we haven’t changed. But we self-evidently have changed. I suppose, in a small way, my presence here is evidence of that.

“The truth is that there are millions of people who we drove away but who share our values and want to join us. Gay people are not the property of the Left, or of any party.”