Win McNamee via Getty Images Bernie Sanders and Hillary Clinton don't exactly see eye to eye on how to deal with migrant children fleeing Central America.

During a spat with presidential rival Sen. Bernie Sanders (I-Vt.) over what to do with thousands of migrant children fleeing Central America, Hillary Clinton said on Thursday it was important to make it loud and clear why they shouldn’t bother coming.

“I made it very clear that those children needed to be processed appropriately," Clinton said at the PBS Newshour Democratic debate. "But we also had to send a message to families and communities in Central America not to send their children on this dangerous journey in the hands of smugglers.”

The courts have found the blanket policy of “sending a message,” however, constitutionally deficient. The term is government-speak for general deterrence -- using detention, deportation and other practices against children and families with the goal of dissuading other children and families from fleeing their countries and coming to the U.S.

In February last year, a federal judge in Washington frowned on the practice and ordered Immigration and Customs Enforcement to stop relying on deterrence in the detention of mothers and children with a “credible fear” of violence and persecution in their homelands.

The government’s “policy of considering deterrence has profound and immediate consequences for Central American asylum seekers detained as a result,” the court said in its decision. The move forced ICE to abandon the practice in May -- at least with respect to children and families seeking refuge in the U.S.

In another case out of California, a federal judge chastised the Department of Homeland Security last July for relying on deterrence as a detention rationale, calling it “lacking in scientific rigor.”

It's also not as simple as just "sending back" unaccompanied minors to Central America. Children traveling without their parents from countries other than Mexico or Canada go through a different process for removal, one that has a longer court process. Adults and minors determined to have a credible fear of returning to their home countries are given a chance under asylum law to argue for relief, which also results in longer periods in the U.S.

"It is not illegal to come to the border of the United States of America and to ask for political asylum in the United States, to ask for refugee status in the United States," Rep. Luis Gutierrez (D-Ill.) said at a House committee hearing last week. "That is not illegal. That is a law and a statute of the United States of America."

The administration has acknowledged poor conditions in Central America and is working to improve them, and Congress allocated $750 million for that effort last year. To discourage people from coming to the United States without authorization, the government funds public service announcements in the countries to warn people about the dangers of the journey. The U.S. will also expand its refugee screening program in Central America as well, officials announced last month.

In the meantime, numbers of unaccompanied minors and families apprehended at the border climbed in the final months of last year, although they dipped in January. The administration ramped up enforcement efforts at the same time through much-criticized raids on families.

Both Sanders and Clinton said they disapproved of the raids, and generally have attempted to go further than President Barack Obama on immigration. But the dispute over dealing with unaccompanied children is a point where the former Secretary of State has run into criticism before.

In 2014, at the height of the surge in apprehensions of minors, she said many of the minors "should be sent back" to their native countries, adding that she supported efforts to improve the situation in Central America so they wouldn't feel they had to leave. Last year she said her position was unchanged, although her larger focus would be getting women and children out of detention.

The Sanders campaign clearly thinks the attack is an advantageous one -- they're already going after her for it.

“Secretary Clinton is wrong," Sanders' Latino outreach director, Arturo Carmona, said in a statement. "We should never put children back into harm's way to 'send a message' to anyone."

PHOTO GALLERY 11 Ways Immigration Reform Helps The Economy