WASHINGTON (AP) — The Homeland Security Department is considering separating children from parents caught crossing the Mexican border illegally, Secretary John Kelly said Monday.

Kelly said such a move would be part of a broader effort to discourage families from making the dangerous trek across Mexico to the U.S. border.

He confirmed that he's considering the action during an interview with CNN Monday. The plan had previously been reported by several news outlets.

Tens of thousands of parents and children fleeing violence and poverty, mostly from Honduras, El Salvador and Guatemala, have been caught crossing the border illegally in recent years. Generally, the families are detained for a few days or weeks before being released into the United States to wait for an immigration judge to decide their fate.

"I would do almost anything to deter the people from Central America getting on this very, very dangerous network ... going through Mexico," Kelly said during his television interview.

Homeland Security officials have been trying to curb the flow of families since 2014 when a flood of both children and families overwhelmed immigration officials. The department launched a public relations campaign in Central America to warn about the dangers and advise families that there would be no free pass into the United States.

The Obama administration opened multiple detention centers that year, in part to deter others from crossing, to house families while immigration judges and asylum officers heard their cases

But a federal judge in California later ruled that detaining children violated a long-standing agreement that bars the government from detaining children in a jail-like setting, even if they are with their parents. That ruling prompted the government to start releasing families into the U.S.

With a backlog of more than half a million cases, it can take years for a case to be completed in federal immigration court.

Leon Fresco, who led the Justice Department's Office of Immigration Ligation under President Barack Obama, said the government has been considering such a move since that federal court ruling.

Story continues

Kelly said if families are separated at the border, the children will be "well-cared for" by government officials.

___

Follow Alicia A. Caldwell on Twitter at www.twitter.com/acaldwellap