Churches were exempted, but colleges, charities and hospitals affiliated with religious groups were not.

After strong objections by Republicans and religious leaders, particularly Catholics, Obama outlined a compromise in February: Women employed by religiously affiliated organizations would still receive free contraception coverage, but the coverage would be funded by insurance companies, not by employers.

“No woman’s health should depend on who she is or where she works or how much money she makes,” Obama said in a televised address, announcing the compromise. “As we move to implement this rule, however, we’ve been mindful that there’s another principle at stake here—and that’s the principle of religious liberty.”

“As a citizen and as a Christian, I cherish this right,” Obama added.

Responding to the new Romney ad, the Obama campaign defended the president’s compromise and accused Romney of trying to “take women’s health back to the 1950s,” noting the presumptive GOP nominee’s pledge to end federal funding for Planned Parenthood.

“President Obama believes that, in 2012, women should have access to free contraception as part of their health insurance, and he has done so in a way that respects religious liberty,” Obama campaign spokeswoman Lis Smith said in a statement.

In the new Romney ad, a narrator asks “Who shares your values?” before asserting “President Obama used his health care plan to declare war on religion, forcing religious institutions to go against their faith.”

“Mitt Romney believes that’s wrong,” the narrator adds.

The ad borrows the “war on religion” phrase from an opinion column the Washington Post’s Michael Gerson wrote before the contraception compromise.

The ad also features footage of Romney quoting Pope John Paul II, “a son of Poland,” on a recent trip to Warsaw and notes that the Republican challenger has been endorsed by former Lech Walesa, the former president of Poland.

“When religious freedom is threatened, who do you want to stand with?” the narrator concludes.