Image copyright Getty Images Image caption Tim Murphy (second left) will resign ffective on 21 October

An anti-abortion US lawmaker will resign after a report this week that he asked his lover to seek a termination during a pregnancy scare.

Tim Murphy announced on Wednesday night he would not stand in next year's mid-term elections.

But the Pennsylvania Republican has now said he will resign from the House of Representatives on 21 October.

His lover suggested he was a hypocrite when he allegedly proposed she seek an abortion.

Only this week he voted for a bill that would outlaw abortions after 20 weeks.

House Speaker Paul Ryan confirmed he had received Mr Murphy's letter of resignation on Thursday.

"We thank him for his many years of tireless work on mental health issues here in Congress and his service to the country as a naval reserve officer," Mr Ryan said in a statement.

The Pittsburgh Post-Gazette reported this week that it had obtained text messages between the married congressman and his lover, forensic psychologist Shannon Edwards.

Mr Murphy admitted to the affair last month after it became public in her divorce proceedings.

According to the newspaper, she sent him a text on 25 January reminding the congressman he had "zero issue posting your pro-life stance all over the place when you had no issue asking me to abort our unborn child just last week when we thought that was one of the options".

A text reply reportedly sent from Mr Murphy's mobile phone maintained it was his staff who were behind the anti-abortion rhetoric, not him.

"I get what you say about my March for life messages," he wrote.

"I've never written them. Staff does them. I read them and winced. I told staff don't write any more. I will."

It turned out the pregnancy scare was unfounded, reports the Post-Gazette.

On Tuesday, the congressman voted in favour of a Republican bill that would criminalise abortions performed after 20 weeks of foetal development.

Mr Murphy, a member of the House of Representatives Pro-Life Caucus who is in his eighth term, was a co-sponsor of the bill.

Media playback is unsupported on your device Media caption Amy has to travel eight hours for an abortion

He has been praised by the Family Research Council, a conservative Christian lobby group, for his stance on abortion and family values.

The anti-abortion bill he co-sponsored is expected to fail in the Senate, where Democrats have enough votes to stop the measure.