The Liberal Democrat MP accused of having an affair with a rent boy earlier this year is to quit Parliament.

Mark Oaten, former home affairs spokesperson, resigned from the Shadow Cabinet role and dropped out of the Lib Dem leadership election last January after newspaper allegations of a gay relationship with a male prostitute.

Yesterday he announced plans to quit his role as an MP at the next general election to concentrate on “new challenges.”

Mr Oaten, 42, said: “I will continue to work for all my constituents both locally and at Westminster, where I also hope to focus on human rights and Third World development issues.

“At the time of the next election I will have served over 12 years as an MP and, having spoken with my wife Belinda, we feel it will be the right time for us to take on new challenges.”

The Winchester MP recently attributed the affair to middle age and his political workload.

He wrote in the Sunday Times, “For most of my life I have never had any doubts about my sexuality. But I have now come to believe that a person’s sexuality is not such a black or white issue.

“I don’t think I would ever have had reason to reconsider my sexuality had it not been for a combination of factors and events at a difficult period in my life.”

These factors included a fear that he was losing his youth after a “dramatic loss of hair” in his 30s, and unhappiness at work.

“To political observers it might have seemed that over the past few years my career had gone from strength to strength. I had one of the most high-profile posts on the Lib Dem front bench. The reality was, however, that not a day went by when I didn’t consider throwing in the towel. I had become a passenger to my own career, swept along by the enthusiasm of others and unable to control where I was heading.

“You lose control over your schedule and you end up trying to snatch time between late-night votes to call home and check on your wife and children, who lead a separate existence 100 miles away.

“I think there was an element of escapism in what I did. I suspect that in part I was trying to reclaim a private domain in my life; but I’m also convinced that I was trying fatally to undermine my own political career. I could never quite bring myself to resign from the front bench and it’s as if I was daring the world to bring the whole thing crashing down.

“It was the pressures of being home affairs spokesman that affected me the most. This is an important role in any party, but for the Lib Dems our stance on home affairs issues has been crucial in shaping the party’s identity and creating clear water between us and the other two parties.

“The life of a high-profile frontbench MP is a real 24/7 job. The day begins with the Today programme and ends with Newsnight. (Personally I prefer Big Brother to Newsnight and Magic 105.4 to Today,

He is now back with his wife and receiving what Mrs Oaten called “intensive marriage therapy.”