Philip Carino

President Trump signed an executive order on Wednesday to end his controversial policy that has resulted in thousands of family separations and brought criticism from Democrats and Republicans.

"We're going to keep families together but we still have to maintain toughness or our country will be overrun by people, by crime, by all of the things that we don't stand for and that we don't want," Trump said Wednesday morning, when he announced that he would sign the order.

Melania Trump Pressured President Trump To Change Family Separation Policy POLITICS Melania Trump Pressured President Trump To Change Family Separation Policy The president signed the order in the Oval Office just after 3 p.m. with Vice President Pence and Secretary of Homeland Security Kirstjen Nielsen, who has been the subject of intense criticism, present for the signing.

The order aims to end the separation of most migrant families by detaining them together while they await their court dates in criminal and immigration court. It says that while the administration will "rigorously" enforce immigration laws, it is "also the policy of this Administration to maintain family unity, including by detaining alien families together where appropriate and consistent with law and available resources."

You can read the full executive order here.

It also directs Defense Secretary Jim Mattis to find housing for these families and to build facilities if necessary.

A 2015 court order currently prevents the federal government from detaining children with their parents in detention centers for more than 20 days. This decision was in a case that established standards for the care of migrant children — what is known as the Flores settlement. In the order, the president also directs Attorney General Jeff Sessions to file a request in U.S. District Court in California to modify the Flores settlement so that the families could be detained together until their court dates.

The order also provides that the Department of Homeland Security won't detain an immigrant family together "when there is a concern that detention of an alien child with the child's alien parent would pose a risk to the child's welfare."

Reaction to the executive order began coming almost immediately. Trump's daughter Ivanka thanked her father on Twitter for "taking critical action ending family separation at our border."