David Davis, the Shadow Home Secretary, has revealed that he recently attended a civil partnership ceremony.

The MP for Haltemprice and Howden is seen as more right-wing than David Cameron, who defeated him in the contest for Conservative leader in 2005.

In an interview with the Daily Telegraph Mr Davis claims to be a social liberal.

“People think I’m traditional but I gave away a gay friend at his civil partnership ceremony the other day,” he said.

“In a perfect world everybody would understand absolutely what I stand for.”

Mr Davis, 58, has been an MP since 1987.

Since Labour came to power he has voted against the equalisation of consent, the abolition of Section 28 and the rights of gay couples to adopt. He was absent from votes on civil partnerships.

Mr Davis was absent from the most recent gay rights vote when Tory MPs forced a division in the House of Commons on the Sexual Orientation Regulations in March.

During his campaign for the party leadership 18 months ago, Mr Davis told journalists that as a teenager he intervened in the intimidation of a gay pupil by a gang of bullies at his inner London school.