A day after text messages emerged showing he had asked a lover to have an abortion, Republican Congressman Tim Murphy on Thursday said he will resign from the House later this month. Murphy has a pro-life stance on the abortion debate in public.

He had on Wednesday said that he would not seek re-election but would serve his remaining term. He has been Representative for a Pennsylvania district in the Congress since 2003.

The resignation comes amid backlash after The Pittsburgh Post-Gazette revealed text messages Murphy and Shannon Edwards exchanged in January after his office had posted an anti-abortion statement on Facebook. In September, Murphy had admitted to having an extra-marital affair with Edwards.

After the Facebook post, Edwards reportedly texted him on January 25: “You have 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.”

Murphy is a member of the House Pro-Life Caucus and is popular among the anti-abortion camp. His resignation from the House will be effective from October 21.