The Senate failed on Tuesday to advance a bill that would ban most abortions after 20 weeks of pregnancy in a high-profile messaging vote held by Republican leaders ahead of Pope Francis’s visit to the Capitol.

The result was expected. Democrats pledged to filibuster the bill, which passed the House earlier this year, and Republicans could not garner the 60 votes necessary to block it.

The vote was 54 to 42. Two Republicans — Susan Collins of Maine and Mark Kirk of Illinois — voted against proceeding with the bill. Three Democrats — Bob Casey Jr. of Pennsylvania, Joe Donnelly of Indiana and Joe Manchin of West Virginia, voted in favor. Four senators — Barbara Boxer (D-Calif.), Lisa Murkowski (R-Alaska), Patty Murray (D-Wash.) and Mark Warner (D-Va.) — did not vote.

The move by Senate Republicans is part of a push to channel conservative anger over Planned Parenthood away from a fight over funding the government. Congress must pass a bill to fund the government by  Sept. 30 or it will shut down. But the bill’s defeat and other factors are unlikely to dampen conservatives’ desire to link a measure defunding Planned Parenthood to the shutdown fight.

The bill, the Pain-Capable Unborn Child Protection Act, is similar to post-20-week bans that have been passed in 11 states, citing research indicating that fetuses are capable of feeling pain at that point in their development.

“We in this chamber are never going to agree completely on the abortion question, but we should at least be able to agree that if an unborn child has reached the point where he or she can feel pain, that child’s life deserves protection,” Senate Majority Leader Mitch McConnell (R-Ky.) said before the vote.

That claim, like many others surrounding the abortion issue, is in sharp dispute. The Guttmacher Institute, which conducts research on abortion practices and policies, calls the 20-week pain-capable claim “spurious,” and Democrats have challenged the constitutionality and the medical underpinnings of the post-20-week ban.

Sen. Dianne Feinstein (D-Calif.) in a Monday floor speech said the 20-week milestone “is just not notable from a fetal development standpoint.”

“More than 40 years ago, the Supreme Court stipulated that abortion is legal until a fetus is viable. Well, in no way, shape, or form is a 20-week fetus viable,” said Feinstein, who called the bill “part of a sustained assault on a woman’s access to health care and her right to make decisions for herself and her family.”

Abortion-rights advocates, including Planned Parenthood, have highlighted stories of parents who discovered around the 20-week-mark that their babies were developing with defects that would make it impossible for them to survive outside the womb.

On Tuesday, three Republican senators and a host of anti-abortion advocacy groups sought to undermine those arguments, inviting the parents of Micah Pickering, a healthy 3-year-old boy born around the 20-week mark to address reporters.

“The baby feels excruciating pain,” said Sen. Lindsey O. Graham (R-S.C.), a leading proponent of the post-20-week ban. “Is it okay to allow abortion on demand at 20 weeks knowing what we know now?”

Graham denied that the vote was timed to coincide with Pope Francis’s visit to the Capitol Thursday, and McConnell did not mention Francis in his Tuesday remarks. But other senators linked the vote with the papal visit.

Sen. Charles E. Grassley (R-Iowa) said Pope Francis’s visit “reminds us all of how very important it is to show compassion and concern for the most innocent and vulnerable among us.”

“Unborn children who fall into this category are entitled to the same dignity all human beings share,” he continued. “This is true even when their presence might be uncomfortable or create difficulties, the Pope reminds us.”