The United States government has reunited 522 migrant children who were separated from adults as part of President Trump’s “zero tolerance” immigration policy, the Department of Homeland Security said late Saturday.

The government “knows the location of all children in its custody and is working to reunite them with their families,” the department said in a statement.

After weeks of public pressure, Mr. Trump signed an executive order on Wednesday meant to end the separation of families at the border by detaining them together for an indefinite period instead.

The separations began after the federal government announced in April that it would pursue a “zero tolerance” policy of criminally prosecuting every adult who illegally crossed the border or tried to do so.