Nearly 2,000 child migrants have been separated from their parents in the six weeks following the implementation of Attorney General Jeff Sessions' "zero-tolerance" policy, according to the Department of Homeland Security. Here's how it happens.

Bottom line: This started with the Justice Department’s “zero tolerance” policy at the border. But it was empowered by the Department of Homeland Security, which began forcibly separating families arrested for crossing the border in order to send the adults to DOJ for prosecution.

Get more stories like this by signing up for our daily morning newsletter, Axios AM.

Let's break it down:

Attorney General Jeff Sessions announced the "zero-tolerance" policy earlier this year, which aggressively enforces the 1965 law that made illegal entry into the U.S. a federal misdemeanor. The goal of the new policy was to criminally prosecute 100% of immigrants caught illegally crossing the border. Shortly afterward, DHS announced that all immigration enforcement officers are to turn in any adult immigrant caught crossing the U.S. border illegally to DOJ for prosecution. With parents in federal custody, kids are forced to go elsewhere. Plus, a 2015 federal court ruling — which declared that no minors could be held in immigrant detention for more than 21 days — opened a legal door for DHS to keep detained parents separated from their kids.

This has led to heart-wrenching stories and audio of migrant children crying after being separated from their parents — a practice that has been condemned by the United Nations, lawmakers from both parties and human rights advocates.

The other side: DHS and DOJ continues to insist they are merely enforcing existing laws. "Congress and the courts created this problem and Congress alone can fix it," Homeland Security Secretary Kirstjen Nielsen said yesterday.

Illegal crossing

If a family of immigrants is caught illegally crossing the border between ports of entry, because of Sessions' "zero-tolerance" policy, they are first sent to an immigrant processing center.

is caught illegally crossing the border between ports of entry, because of Sessions' "zero-tolerance" policy, they are first sent to an immigrant processing center. Within 48 hours of apprehension, according to a Customs and Border Patrol pamphlet given to CNN, the adults will be criminally charged with entering the U.S. illegally and referred to the Department of Justice.

according to a Customs and Border Patrol pamphlet given to CNN, the adults will be criminally charged with entering the U.S. illegally and referred to the Department of Justice. Yes, but: While the CBP handout said immigrants would be handed over within 48 hours, immigrants told lawmakers visiting a CBP immigrant processing center in McAllen, Texas, that they had been held there for seven days, according to CNN.

While the CBP handout said immigrants would be handed over within 48 hours, immigrants told lawmakers visiting a CBP immigrant processing center in McAllen, Texas, that they had been held there for seven days, according to CNN. The children are placed in the custody of the Department of Health and Human Services.

The goal of the "zero-tolerance" policy is to prosecute 100% of those caught crossing the border illegally. DHS officials told reporters on a call on Friday that they do not yet refer 100% of the cases, but did not give any information on how they decide which immigrants to send to DOJ.

Before the policy, families were either released or held in ICE family detention centers until their hearing in front of an immigration judge. There were some successful Obama-era pilot programs that experimented with using ankle bracelets and other incentives for families to actually show up to their immigration court hearings.

What's next for the kids:

The children are placed in one of more than 100 temporary shelters in 17 states run by Health and Human Services, which takes care of both separated children and minors who illegally cross the border on their own. These are the kinds of shelters recently seen by reporters in Brownsville, Texas.

in one of more than 100 temporary shelters in 17 states run by Health and Human Services, which takes care of both separated children and minors who illegally cross the border on their own. These are the kinds of shelters recently seen by reporters in Brownsville, Texas. By the numbers: Many of these shelters are nearing capacity, and the U.S. government could end up holding up to 30,000 migrant children by the end of August if detention rates continue, the Washington Examiner reported.

Many of these shelters are nearing capacity, and the U.S. government could end up holding up to 30,000 migrant children by the end of August if detention rates continue, the Washington Examiner reported. HHS seeks to find relatives or foster families to take care of the children until they can be reunited with their parents.

to take care of the children until they can be reunited with their parents. In fiscal year 2017, 90% of immigrant children were released to sponsors, according to a CBP fact sheet, and HHS claims the average length of stay for minors is approximately 57 days.

were released to sponsors, according to a CBP fact sheet, and HHS claims the average length of stay for minors is approximately 57 days. If no suitable guardian is found, HHS by law must then keep the child in the "least restrictive" shelter that is in the best interest of the child until they can be reunited with their parents.

What's next for the parents:

They face criminal prosecution for crossing into the U.S. illegally. Most receive "time served" and remain in detention for at least a week, according to a DOJ official.

for crossing into the U.S. illegally. Most receive "time served" and remain in detention for at least a week, according to a DOJ official. After they've served their time, they are returned to ICE custody. CBP claims they will be able to communicate with their kids via phone calls or video conferencing until their deportation.

they are returned to ICE custody. CBP claims they will be able to communicate with their kids via phone calls or video conferencing until their deportation. Once in deportation proceedings, immigrants can apply for asylum and would need to prove fear of persecution by returning to their home country.

immigrants can apply for asylum and would need to prove fear of persecution by returning to their home country. Parents are not guaranteed to be reunited with their children until deportation, but an ICE official told Axios that those decisions are determined on a case by case basis.

Legal crossing

There are 48 legal ports of entry along the Mexico-U.S. border, which are official, legal crossing points. A family unit can present proper non-immigrant visas and passports there and avoid any family separation.

Yes, but: While crossing at ports of entry avoids the ramifications of the 100% prosecution strategy of DOJ, they will still likely spend time in detention, and there have been reports of immigration officers turning asylum-seekers away before they even reach ports of entry.

Go deeper: