President Donald Trump incorrectly claimed that a new Homeland Security practice of separating children from their parents at the US border was the result of Democratic legislation.

In fact, there is no federal law mandating that parents and children who cross the border illegally be separated from each other.

The practice was introduced this year by Attorney General Jeff Sessions as part of a crackdown on illegal border crossings.

In a tweet posted on Tuesday morning, President Donald Trump blamed Democrats for a controversial Homeland Security policy of separating parents and children who illegally cross the border together.

"Separating families at the Border is the fault of bad legislation passed by the Democrats. Border Security laws should be changed but the Dems can't get their act together! Started the Wall," he wrote.

There is no federal law passed by Congress that mandates separation of families who cross the border illegally.

It would be nearly impossible for the Democratic Party to have passed that bill by themselves in the last three years, as the Republican Party has controlled both houses of Congress since 2015.

Prior to the Trump administration, families who entered illegally with children were rarely prosecuted at all. In most situations, they were kept together in family detention centers before having their cases decided in immigration court or being deported as a family.

On April 6, Attorney General Jeff Sessions announced a new "zero-tolerance" approach to illegal immigration which now does prosecute adults who enter illegally with children, many of whom are seeking asylum in the US due to violence in their home countries.

Under this policy, adults are transferred to federal custody to be criminally prosecuted. Because children cannot be in jail with them, they are referred to the Office of Refugee Resettlement to be placed with sponsors or in foster care.

"If you are smuggling a child then we will prosecute you, and that child will be separated from you as required by law," Attorney General Jeff Sessions said May 7 at a press conference in Scottsdale, Arizona. "If you don't like that, then don't smuggle children over our border."

When pressed by radio host Hugh Hewitt on Tuesday about whether the new policy was absolutely necessary, Sessions responded: "Yes. What’s happening is we are having more people coming bringing children with them entering between the ports of entry, between the ports of entry illegally, and they're not, you cannot give them immunity."

There are federal laws in place that outline protocol for handling unaccompanied minors who cross the border illegally, some of which were passed under Democratic control.

The Flores Settlement Agreement of 1997 mandates that unaccompanied minors be released to family members or sponsors while their cases are resolved, and the Trafficking Victims Protection Re-authorization Act of 2008 allows undocumented minors to be transferred to Health and Human Services Custody.

However, none of these laws mandate the breaking up of families, and none of them would be used if the Trump administration weren't creating large volumes of unaccompanied minors by separating them from their parents.

The practice has sparked outrage across the country and the world. On Tuesday morning, the United Nations human rights office in Geneva called for an end to the family separation policy, saying it constitutes a "child rights violation."