After a lengthy legal battle, two Christian colleges have won a lawsuit seeking to obtain a religious exemption from the Obamacare contraception mandate.

Last week, a federal district court ruled in favor of the schools, represented by religious liberty law firm Alliance Defending Freedom, barring the federal government from enforcing the 2010 Patient Protection and Affordable Care Act mandate requiring employers to provide health care plans that cover contraceptives, including emergency contraceptives.

"Defendants now agree that enforcement of the rules regarding the contraceptive mandate against employers with sincerely held religious objections would violate the RFRA."

While the mandate technically exempted religious organizations, it was commonly criticized for narrowly defining the term, thereby excluding many faith-based colleges and universities from the list.

[RELATED: Students slam Northwestern for ‘morally wrong’ Plan B advice]

Grace College and Seminary in Indiana and Biola University in California are both Christian institutions of higher education and subscribe to the biblical view that God created man in His image, meaning that human life is sacred.

Likewise, both institutions see abortion as violating this sanctity, arguing that their faith prohibits them from paying for drugs that may act as abortifacients.

Although the government offered faith-based schools a compromise in 2012, whereby contraceptive coverage would be paid for by third-parties, Grace and Biola deemed that solution inadequate and filed an amended complaint against the government in 2013, the ruling noted.

While the Trump administration issued new regulations in 2017 that would have resolved the issue, the court documents note that judges have ordered preliminary injunctions against them over procedural issues, preventing them from taking effect.

[RELATED: Christian College wins court battle against contraceptive mandate]

In accordance with Trump’s call to refrain from defending the mandate, however, the government acknowledged that the requirement would violate the colleges’ rights under the Religious Freedom Restoration Act (RFRA), and on June 1, United States District Court Judge Jon E. Deguilio issued an order giving the schools a permanent injunction against the enforcement of the mandate and a declaratory judgement in their favor.

“After reconsideration of their position, Defendants now agree that enforcement of the rules regarding the contraceptive mandate against employers with sincerely held religious objections would violate the RFRA,” the judge wrote, adding that “the Court agrees that Plaintiffs are entitled to a permanent injunction and declaratory relief.”

Deguilio also cited “the public interest in the vindication of religious freedom,” noting that students and faculty at the schools were previously aware of the institutions’ religious beliefs regarding abortifacients.

Follow the author of this article on Twitter: @SFarkas48