Massive public outcry has built over children being separated from their parents as they attempt to cross into the U.S. illegally.

After Attorney General Jeff Sessions announced a “zero-tolerance” policy in dealing with migrants who cross into the U.S. illegally, nearly 2,000 children were separated from their families during a six-week period in April and May.

Read on for a look at what’s happening to children at the border – and what the law actually says.

What does the law say?

There is no law that dictates children must be separated from their parents when caught crossing into the country illegally, and there was a time when ICE policy didn’t call for detaining all families.

There are, however, laws against entering the U.S. illegally, and a decree regarding how long children can be held in immigration detention. A 2008 anti-trafficking statute dictates that certain minors must be taken out of immigration detention within 72 hours.

ICE is, by law, prohibited from detaining unaccompanied children, DHS says.

Once a parent or guardian has been apprehended and charged for illegally entering the U.S., the children are then transported to the Department of Health and Human Services’ (HHS) Office of Refugee Resettlement (ORR), which is “responsible for their care and is required by law to place unaccompanied minors in the least restrictive setting that is in the best interest of the child.” This generally means the child can be placed in the care of a relative already in the U.S.; however, a minor can also be put into foster care or a temporary detention center.

According to DHS, children in HHS ORR care are given medical and mental health attention, if needed, as well as educational programs. They are “normally held in a temporary shelter or hosted by an appropriate family,” DHS said.

While in custody, according to DHS, officials look for a “sponsor” for the minor. Sponsors can include a relative that “meets criteria for the safety of the child and continuation of any immigration proceedings.” Parents, too, can ask to sponsor his or her child after being released.

Minors are only allowed to be detained for 20 days, thanks to the 1997 Flores settlement agreement. The White House said this agreement has “hampered the government’s ability to detain and promptly remove any Unaccompanied Alien Children and family unites.”

Is there a difference between what Trump is doing compared to previous presidents?

The Trump administration isn’t the first to separate adults and children at the border – but it did up the ante with the “zero-tolerance” policy, what the Justice Department called a “new” plan to curtail illegal immigration in April.

“If you are smuggling a child, then we will prosecute you and that child will be separated from you as required by law,” Sessions said in May.

According to the Bipartisan Policy Center, families were rarely detained before the early 2000s. Instead, they were released and given an immigration court hearing they were required to attend.

Former President George W. Bush, too, had a “zero-tolerance” policy for illegal immigration – but under his administration, officials generally exempted family units and minors from the “Operation Streamline” process where migrants were quickly prosecuted and deported, according to The New York Times. In 2008, Bush signed a law unanimously passed by Congress that called unaccompanied minors to be released into the “least restrictive setting.”

Under the Obama administration, families were often detained together in administrative ICE custody, The Times reported.

However, in 2013, the Obama administration was criticized as ICE deported more than 72,000 parents who had at least one U.S.-born child, according to HuffPost. Some of those children were able to remain in the U.S. with relatives, while others were put in foster care, HuffPost reported.

What’s the difference between an unaccompanied minor and family unit?

Children under 18 who arrive at the border alone are considered to be an “unaccompanied alien child,” or unaccompanied minor. However, children with a parent or guardian are considered to be part of a “family unit.”

According to Homeland Security Secretary Kirstjen Nielsen, the number of people attempting to cross the southern border illegally has increased to more than 50,000 people per month. She said in June there has been a 325 percent increase in unaccompanied children coming to the border since the previous year, and a 435 percent increase in families entering the U.S. illegally.

The White House has suggested the influx of unaccompanied minors coming across the U.S. border is being used by gangs, such as MS-13, to recruit new members. According to the White House, more than one-third of already arrested MS-13 members and associates came into the U.S. as an unaccompanied minor.

What has the response been to the separation of children and parents?

The separation of children from their parents at the border has brought widespread and bipartisan condemnation of the act, from politicians to activists and from celebrities to parents.

All of the living first ladies, including Melania Trump, have expressed opposition to the policy. In a rare public statement, Mrs. Trump said she “hates” to see families separated at the border. Her spokeswoman said the first lady “believes we need to be a country that follows all laws, but also a country that governs with heart.”

Hillary Clinton, also a former secretary of state and presidential nominee, said the policy is a “moral humanitarian crisis.” In a tweet, she said, “Every parent who has ever held a child in their arms, every human being with a sense of compassion and decency, should be outraged.”

“I live in a border state. I appreciate the need to enforce and protect our international boundaries, but this zero-tolerance policy is cruel,” Laura Bush said. “It is immoral. And it breaks my heart.”

Multiple governors, including Republicans, have announced they will not send National Guard troops to the border until the separation policy is stopped. Maryland Gov. Larry Hogan said he ordered the four troops already deployed to return home, and Massachusetts Gov. Charlie Baker reportedly canceled the deployment of his state’s National Guard troops.

The Trump administration has attempted to distance itself from the policy, with the president falsely repeatedly blaming Democrats, claiming they “are the problem” and “don’t care about crime.”

"#CHANGETHELAWS Now is the best opportunity ever for Congress to change the ridiculous and obsolete laws on immigration. Get it done, always keeping in mind that we must have strong border security," Trump said in a June 19 tweet.

But Democrats have similarly pointed fingers at Trump, saying he has the power to change things.

"Stop using the suffering of these little children as some barbaric bargaining chip. You started this and can end it right now. #FamiliesBelongTogether," House Minority Leader Nancy Pelosi, D-Calif., replied to Trump's tweet.

The Associated Press contributed to this report.