WASHINGTON — Representative Tim Murphy, an outspoken abortion opponent embattled by allegations that he encouraged his lover to terminate a pregnancy, announced Thursday that he would step down from his House seat this month.

Speaker Paul D. Ryan said on Thursday afternoon that Mr. Murphy, a Republican who has represented his conservative Pennsylvania district since 2003, had sent him a letter of resignation, effective Oct. 21.

“It was Dr. Murphy’s decision to move on to the next chapter of his life, and I support it,” Mr. Ryan said in a statement. “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.”

Less than 24 hours earlier, Mr. Murphy, 65, had announced that he would not seek re-election but would serve out his term. But he has faced an intensifying backlash over reports from The Pittsburgh Post-Gazette that he encouraged the woman with whom he was having an extramarital affair to have an abortion during an unfounded pregnancy scare.