An MP with a hostile voting record on gay issues has defected from the Conservatives to the Labour party.

Quentin Davies, a former Tory Shadow Cabinet member, has been an MP for 20 years and represents Grantham, the home town of former Prime Minister Margaret Thatcher.

He announced his defection the day before Tony Blair is to leave office, and attacked Tory leader David Cameron in his resignation letter:

“Under your leadership the Conservative Party appears to me to have ceased collectively to believe in anything, or to stand for anything,” he wrote to Mr Cameron.

“It has no bedrock. It exists on shifting sands. A sense of mission has been replaced by a PR agenda.”

Mr Davies’ record on gay rights is hugely out of step with the Labour party he has just joined.

He voted against the equalisation of consent, against the rights of gay couples to adopt, in favour of retaining Section 28 and against civil partnerships.

In March 2007 he was one of the Tory MPs who defied their own front bench and tried to stop the Sexual Orientation Regulations in House of Commons.

In 2001 Mr Davies was appointed to the Shadow Cabinet by Iain Duncan Smith and served for two years. Michael Howard returned him to the backbenches when he became leader in 2003.

Mr Davies, 63, said in his letter to Mr Cameron:

“Although you have many positive qualities you have three, superficiality, unreliability and an apparent lack of any clear convictions, which in my view ought to exclude you from the position of national leadership to which you aspire and which it is the presumed purpose of the Conservative Party to achieve.

“Believing that as I do, I clearly cannot honestly remain in the party. I do not intend to leave public life.”

Mr Davies called Mr Brown: “a leader I have always greatly admired, who I believe is entirely straightforward, and who has a towering record, and a clear vision for the future of our country which I fully share”.

In a statement, Prime Minister-in-waiting Gordon Brown said:

“Quentin Davies is a senior parliamentarian and he commands respect on all sides for his expertise and his dedication to public service, and I welcome him to the new Labour Party.”