LINCOLN, Neb. — Seven attorneys general trying to block the federal health care law’s requirement for contraception coverage saw their lawsuit dismissed Tuesday by a federal judge who said they didn’t have standing to file it.

U.S. District Court Judge Warren Urbom ruled that the states, including South Carolina, didn’t prove they would suffer immediate harm once that part of the law is enacted. The judge also noted that President Barack Obama’s administration has agreed to work with religious groups to try to address their concerns.

The lawsuit was challenging a rule in the law that requires contraception coverage in health care plans, including for employees of church-affiliated hospitals, schools and outreach programs. The suit argued that the rule violated the rights of employers that object to the use of contraceptives, sterilization and abortion-inducing drugs.

The lawsuit was filed by Republican attorneys general from South Carolina, Nebraska, Florida, Michigan, Ohio, Oklahoma and Texas. Plaintiffs also included three Nebraska-based employers affiliated with the Catholic Church, a nun and a missionary.

“Today’s decision completely disregards the federal government’s continued shell game when it comes to this rule,” said Nebraska Attorney General Jon Bruning, who was leading the case. “Essentially, this decision asks millions of Americans to watch and wait for their religious liberties to be violated.”

Oklahoma Attorney General Scott Pruitt said he planned to talk to his colleagues in other states about an appeal.

“This was not a ruling on whether the religious mandate is a violation of the First Amendment, but merely a decision on whether the plaintiffs can file a lawsuit at this time,” he said in a statement.

The U.S. Justice Department had urged the judge to dismiss the lawsuit.

The lawsuit, filed in U.S. District Court in Nebraska, argued that the rule would effectively force religious employers and organizations to drop health insurance coverage, which would raise enrollment in state Medicaid programs and increase patient numbers at state-subsidized hospitals and medical centers.

In his ruling, Urbom said that argument was “based on layers of conjecture” and failed to show that the rule would strain state budgets.

Urbom said Catholic groups that joined the lawsuit failed to show that a religious exemption written into the rule wouldn’t apply to them. He also noted that Obama’s administration has agreed to work with religious groups.

“In short, the individual plaintiffs have not shown that their current health plans will be required to cover contraception-related services under the Rule, and therefore their claims must be dismissed,” Urbom wrote.

Some legal experts have said that even though the nation’s highest court largely upheld the law, the lawsuit focused on a separate issue and stood a decent chance.

Obama’s administration, in response to the criticism from religious groups, delayed enforcement of the provision until next summer and has said it would shift the requirement from employers to health insurers.

Sign up for our daily newsletter

Get the best of The Post and Courier, handpicked and delivered to your inbox every morning.