The Obama administration has warned two states that defunding Planned Parenthood may be a violation of federal law.

The Department of Health and Human Services (DHHS) advised officials in Louisiana and Alabama that their efforts to terminate Medicaid provider agreements with Planned Parenthood may illegally restrict beneficiary access by not permitting recipients to get services from providers of their choice, reports Reuters.

The Republican governors in both states terminated their Medicaid contracts with Planned Parenthood following the release of a series of controversial undercover videos showing Planned Parenthood officials discussing the harvesting and sale of aborted baby body parts for medical research. Lawmakers in New Hampshire also passed similar measures.

Federal law says that state Medicaid programs must cover family planning services and allow beneficiaries to obtain services from any qualified provider, therefore, ending current arrangements with Planned Parenthood would unlawfully limit beneficiaries' access, reported The Wall Street Journal.

"By restricting which provider a woman could choose to receive care from, women could lose access to critical preventive care, such as cancer screenings," DHHS spokesman Ben Wakana said in a statement, according to The Hill.

Federal courts have previously blocked attempts by states, including Indiana and Arizona, to cut Planned Parenthood from Medicaid, according to the WSJ.

Planned Parenthood has been at the center of a heated national debate since the conservative anti-abortion group Center for Medical Progress released the undercover videos, with the sixth hitting the Internet Wednesday.

A number of Republican presidential hopefuls have vowed to do everything they can to defund Planned Parenthood, including, as former Hewlett-Packard CEO Carly Fiorina suggested this week, shutting down the government if necessary.

Louisiana Gov. Bobby Jindal, one of 17 contenders for the 2016 Republican nomination, was the first to lead his state to cut funding. Mike Reed, a spokesman for Jindal, said that Louisiana and its Department of Health and Hospitals (DHH) are standing by its decision even after federal officials told them it may be a violation of the law, according to Reuters.

He said there is a provision in the state Medicaid contract that allows either party to cancel the contract at will as long as 30 days notice is given.

DHHS' Centers for Medicare & Medicaid Services (CMS) "reached out to DHH after we canceled the Medicaid provider contract with Planned Parenthood," Reed said. "DHH explained to CMS why the state chose to exercise our right to cancel the contract without cause."

Earlier this week, former Arkansas Gov. Mike Huckabee suggested in an interview that if he became president, he would not rule out deploying the National Guard to forcefully halt abortions, and would use the Justice Department to criminally prosecute the group.

Republican front-runner and billionaire businessman Donald Trump said on Tuesday that abortions should not be federally funded, but added that he "would look at the good aspects of" Planned Parenthood. "I'm sure they do some things properly," he told CNN. "We have to take care of women."

Senate Democrats managed to defeat a Republican bill in early August that would have stopped all federal funds from going to Planned Parenthood, but Republicans are expected to bring the issue back up once they return from summer recess in September.