President Donald Trump — after repeatedly saying that it’s up to Congress to stop his administration’s practice of separating families at the border — has now signed an executive order that would hold families together in immigrant detention as their cases are being processed.

Parents will still be prosecuted, but they will be able to remain with their children in custody of the Department of Homeland Security, according to the order. “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,” the order reads. “It is unfortunate that Congress’s failure to act and court orders have put the Administration in the position of separating alien families to effectively enforce the law.”

Trump’s signing of the order follows overwhelming pushback from both sides of the aisle in response to the administration’s “zero tolerance” approach. As part of this policy, adults being prosecuted were held in federal jail while awaiting trial. Their children were sent away, with some passing through repurposed warehouses where they were held in chain-link cages.

Since May, more than 2,300 children have been separated from their families, according to US Customs and Border Protection. As an anonymous administration official told the Washington Examiner earlier this week, that number could actually be much higher. Critics have called the policy “cruel,” “immoral,” and “inhumane.”

Trump’s turnaround follows weeks of horrifying revelations about the administration’s family separation policy and speculation that he was using it as leverage to spur congressional support for a border wall.

It also reaffirms something that lawmakers have emphasized even as the White House pushed a different narrative: Trump could have stopped this policy all along. Read the full executive order below:

By the authority vested in me as President by the Constitution and the laws of the United States of America, including the Immigration and Nationality Act (INA), 8 U.S.C. 1101 et seq., it is hereby ordered as follows:

Section 1. Policy. It is the policy of this Administration to rigorously enforce our immigration laws. Under our laws, the only legal way for an alien to enter this country is at a designated port of entry at an appropriate time. When an alien enters or attempts to enter the country anywhere else, that alien has committed at least the crime of improper entry and is subject to a fine or imprisonment under section 1325(a) of title 8, United States Code. This Administration will initiate proceedings to enforce this and other criminal provisions of the INA until and unless Congress directs otherwise. 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. It is unfortunate that Congress’s failure to act and court orders have put the Administration in the position of separating alien families to effectively enforce the law.

Sec. 2. Definitions. For purposes of this order, the following definitions apply:

(a) “Alien family” means

(i) any person not a citizen or national of the United States who has not been admitted into, or is not authorized to enter or remain in, the United States, who entered this country with an alien child or alien children at or between designated ports of entry and who was detained; and

(ii) that person’s alien child or alien children.

(b) “Alien child” means any person not a citizen or national of the United States who

(i) has not been admitted into, or is not authorized to enter or remain in, the United States;

(ii) is under the age of 18; and

(iii) has a legal parent-child relationship to an alien who entered the United States with the alien child at or between designated ports of entry and who was detained.

Sec. 3. Temporary Detention Policy for Families Entering this Country Illegally. (a) The Secretary of Homeland Security (Secretary), shall, to the extent permitted by law and subject to the availability of appropriations, maintain custody of alien families during the pendency of any criminal improper entry or immigration proceedings involving their members.

(b) The Secretary shall not, however, detain an alien 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.

(c) The Secretary of Defense shall take all legally available measures to provide to the Secretary, upon request, any existing facilities available for the housing and care of alien families, and shall construct such facilities if necessary and consistent with law. The Secretary, to the extent permitted by law, shall be responsible for reimbursement for the use of these facilities.

(d) Heads of executive departments and agencies shall, to the extent consistent with law, make available to the Secretary, for the housing and care of alien families pending court proceedings for improper entry, any facilities that are appropriate for such purposes. The Secretary, to the extent permitted by law, shall be responsible for reimbursement for the use of these facilities.

(e) The Attorney General shall promptly file a request with the U.S. District Court for the Central District of California to modify the Settlement Agreement in Flores v. Sessions, CV 85-4544 (“Flores settlement”), in a manner that would permit the Secretary, under present resource constraints, to detain alien families together throughout the pendency of criminal proceedings for improper entry or any removal or other immigration proceedings.

Sec. 4. Prioritization of Immigration Proceedings Involving Alien Families. The Attorney General shall, to the extent practicable, prioritize the adjudication of cases involving detained families.

Sec. 5. General Provisions. (a) Nothing in this order shall be construed to impair or otherwise affect:

(i) the authority granted by law to an executive department or agency, or the head thereof; or

(ii) the functions of the Director of the Office of Management and Budget relating to budgetary, administrative, or legislative proposals.

(b) This order shall be implemented in a manner consistent with applicable law and subject to the availability of appropriations.

(c) This order is not intended to, and does not, create any right or benefit, substantive or procedural, enforceable at law or in equity by any party against the United States, its departments, agencies, or entities, its officers, employees, or agents, or any other person.

DONALD J. TRUMP

THE WHITE HOUSE,

June 20, 2018.