PITTSBURGH — An anti-abortion congressman asked a woman with whom he was having an extramarital affair to get an abortion when he thought she might be pregnant, a newspaper reported Tuesday.

The Pittsburgh Post-Gazette said it obtained text messages between Republican U.S. Rep. Tim Murphy of Pennsylvania and Shannon Edwards. A Jan. 25 text message from Edwards said the congressman 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,” according to the paper.

A text message from Murphy’s number in response said the staff was responsible for his anti-abortion messages: “I’ve never written them. Staff does them. I read them and winced. I told staff don’t write any more.”

Edwards, it turned out, wasn’t pregnant.

Murphy’s spokeswoman had no comment on the report.

The revelation came as the House on Tuesday approved Republican legislation that would make it a crime to perform an abortion after 20 weeks of fetal development. Murphy, a member of the House Pro-Life Caucus, is among its co-sponsors. He avoided the media in Washington after voting for the legislation, and efforts by reporters to talk to him were unsuccessful.

The bill faces certain defeat in the Senate, where Democrats have enough votes to kill it.

NARAL Pro-Choice America quickly criticized “the height of hypocrisy” displayed by Murphy’s support for the legislation.

“You shouldn’t have to be a member of Congress just to access your right to abortion,” said Sasha Bruce, a vice president for the pro-abortion rights group.

Murphy recently acknowledged his affair with Edwards, which became public as a result of her divorce proceedings.

He is serving his eighth term representing a district in southwestern Pennsylvania.