Most vulnerable Senate incumbents stuck with their parties in Thursday’s vote on a controversial amendment to weaken the healthcare law’s contraception mandate.

Sens. Scott Brown (R-Mass.) and Dean Heller (R-Nev.) both voted against killing Sen. Roy Blunt’s amendment, which would have let any employers opt out of healthcare coverage mandates, including the contraception mandate, if it violated their religious or moral beliefs.

Most vulnerable Democrats also stuck with their party. Democratic Sens. Claire McCaskill (Mo.), Jon Tester (Mont.), Sherrod Brown (Ohio), Debbie Stabenow (Mich.) and Bill Nelson (Fla.) voted to toss out the amendment.

Two of the three Democrats who voted against getting rid of the amendment are up for reelection next year. Sens. Bob Casey Jr. (Pa.) and Joe Manchin (W.Va.), both anti-abortion rights Democrats, are heavily favored in their races.

The issue has been a hot one in many Senate contests.

Republicans have been running ads slamming McCaskill for agreeing with Obama on the issue, forcing her to respond in kind, while former Virginia Gov. Tim Kaine (D) has been hammering at former Sen. George Allen (R-Va.) on social issues and has criticized him for not taking a stand on the bill.

Some women’s groups have called the measure Blunt-Brown to associate it with the Republican from Massachusetts, who is considered the most vulnerable Republican senator up for reelection this year.

The White House policy requires employers to include contraception in their employees’ health plans. It exempts churches and houses of worship.

Religious-affiliated employers such as Catholic hospitals would not have to directly cover birth control in their healthcare plans, but their employees could still obtain it, without a copay, from the firm's insurance provider.

Two retiring senators also split from their party: Sen. Ben Nelson (D-Neb.) voted with the Republicans, while Sen. Olympia Snowe (R-Maine) voted with the Democrats.