[Read the latest edition of Crossing the Border, a limited-run newsletter about life where the United States and Mexico meet. Sign up here to receive the next issue in your inbox.]

LOS ANGELES — A federal judge on Thursday gave the Trump administration six months to locate thousands more children and parents who were potentially separated at the southern border under a policy intended to deter illegal immigration.

Early this year, it came to light that many more children most likely had been forcibly separated from their parents even before a border-enforcement policy known as zero tolerance was officially unveiled in the spring of 2018. Under the policy, nearly all adults who entered the country illegally faced criminal prosecution, and any children accompanying them were placed in shelters or foster care. They often ended up hundreds or thousands of miles apart for weeks or longer.

Judge Dana M. Sabraw of the United States District Court for the Southern District of California had asked the government to devise a plan to account for the additional children and their families. The request came after a report from government inspectors in January revealed that the Trump administration most likely separated thousands more children from their parents than had been previously reported, because of a lack of coordinated formal tracking among the various federal agencies involved.