Anti-abortion group Susan B. Anthony List on Monday launched websites and digital ad campaigns to attack vulnerable Senate Democrats for voting against a failed bill that would have banned abortion 20 weeks into a pregnancy.

The messaging targets Democratic Sens. Sherrod Brown of Ohio, Claire McCaskill of Missouri, Heidi Heitkamp of North Dakota, and Jon Tester of Montana for being "too extreme on abortion."

"As the polling noted below makes clear, their votes against this compassionate, consensus legislation put these senators dramatically out of step with their constituents and the pro-life American majority," SBA List said in a statement.

SBA List expected the legislation to fail because the bill needed 60 votes in favor of ending debate, which would have set up a vote to pass it. But even with all 51 Republicans in support, the bill needed nine Democrats, and those votes weren't there — the bill fell in a 51-46 vote. Anti-abortion groups aimed to get senators on the record regarding the issue ahead of the midterm elections.

SBA List has been working in states since July 2017 to encourage voters to turn out to the polls in November to elect senators who oppose abortion. Public opinion on abortion rights remains slightly more in favor of abortion rights, but support wanes when an abortion occurs later in a pregnancy, according to past Gallup polls on the issue.

The failed bill, the Pain-Capable Unborn Child Protection Act, would have punished doctors who perform abortions with a fine, up to five years in prison, or both.