A prominent gay politician has been selected to fight the constituency of Grantham and Stamford for the Conservatives at the next election.

Nick Boles, who was a frontrunner to be his party’s candidate for Mayor of London until he withdrew from the race after being diagnosed with a form of cancer, came within 500 votes of winning Hove in the 2005 election.

He told PinkNews.co.uk that he is “amazed and delighted” to have beaten off strong competition from three other candidates to win selection for the seat, which has particular resonance with Tories.

Former Prime Minister Margaret Thatcher was born and raised in Grantham.

The Tory nomination became vacant when sitting MP Quentin Davies defected to the Labour party just before Gordon Brown took office as Prime Minister.

Mr Boles beat a sitting MP, James Brokenshire, for the nomination, which was decided by a vote of more than 200 Tory activists who attended a selection meeting.

“It’s been quite a tough year for me and I feel the sun has come out from behind the clouds,” he told them after it was announced he had won the selection.

All four hopefuls said they favoured fox hunting and nuclear power and opposed cuts to the local hospital. Mr Boles was chosen in the third ballot.

“There were three other very strong candidates and I was not the favourite, so it came as very pleasant surprise to be selected,” he told PinkNews.co.uk.

Barclays Bank director Stephen Barclay and businesswoman Vicky Ford were the other candidates.

The constituency is a safe Tory seat centred round the towns of Grantham and Stamford in Lincolnshire.

In 2007 Mr Davies was returned with a 7,445 (15.8%) majority.

Mr Boles said that he had made a short statement to party activists, during which he mentioned that he is gay and that his personal life is “private but not a secret” and was given a round of applause for his comments.

“I think it is a remarkable testament to how much the party has changed. I said that I thought being gay had no relevance and I hoped they would think the same – it would not change the way I would seek to represent them.

“A lot of people in the audience were fairly elderly so I was pleased and delighted they chose me.”

Mr Boles was a strongly-tipped candidate for the Tory nomination for Mayor of London, but withdrew in July when he was diagnosed with Hodgkins Lymphoma, a type of cancer.

He told PinkNews.co.uk that his health is good. “I have been incredibly lucky – my latest scan says its all gone and after only two months of chemotherapy – and my hair didn’t even fall out!

“I had expected to be out of action for six months but I felt well enough to stand.”

The party’s nomination for Mayor of London was won last month by fellow Cameron ally and friend Boris Johnson.

Mr Boles said he does not regret pulling out of the race, despite returning to full health much sooner than expected.

“I feel that in life some things are meant to happen and other things aren’t – Boris was meant to be selected.

“If you were writing a TV script you would write Boris as the candidate to take on Ken. Perhaps I was meant to take the nomination for Grantham and Stamford. It is a beautiful constituency.”

An influential member of the “Notting Hill set,” last week Mr Boles hit the headlines when he revealed that David Cameron’s change of heart on gay issues was in part due to Sarah.

Referring to Mr Cameron’s previous support for Section 28, Mr Boles said:

“I think she had a much stronger sense of how unacceptable that piece of legislation was … and she helped him understand it. She always got why it was so offensive.”