The best way to describe Donald Trump’s current policy toward families crossing the US-Mexico border is this: He just went from being much harsher than Barack Obama to trying to get the courts to let him be as harsh as Obama was.

The executive order Trump signed yesterday opens the door to him using a tactic Obama used in 2014: the wide-scale detention of immigrant families for as long as it took to complete their immigration cases and deport them.

Comparisons between Trump and Obama on immigration usually focus on deportations of unauthorized immigrants living in the US. Trump has been rapidly expanding enforcement, but the numbers are still comparable to Obama’s first term. (Obama holds the record for deporting more immigrants than any president, with more than 2 million deportations over eight years — though he scaled back enforcement in the last two years of his administration.)

But the effects of the Trump administration’s “zero tolerance” policy for prosecuting illegal entry this spring — the separation of families as a matter of standard government practice for about six weeks, and now (thanks to Trump’s executive order) a coming court fight over the indefinite detention of families seeking asylum — are reminiscent, for those of us who’ve been following immigration for a while, of what the Obama administration did in 2014.

The comparison to Obama’s policies is especially relevant now that the Trump administration is seeking to keep families in immigration detention for weeks or months. The reason that Trump can’t do that under a current judicial order is that the courts stepped in to stop Obama from doing it.

Now Trump is trying to remove the shackles placed on his predecessor.

Obama was faced with a genuine increase in children and families coming to the US; Trump just decided that typical numbers were unacceptable

The most important thing to remember, when we’re comparing Obama’s response to the 2014 border “crisis” to what Trump is doing now, is this chart:

This chart combines two things: the number of people caught crossing into the US between ports of entry (apprehensions) and the number of people who came to ports of entry without immigration papers — for example, to seek asylum (“inadmissibles”). The two lines most likely to jump out at you, each of which represents one fiscal year (October-September instead of January-December), are the blue line that arcs high over the summer months and the orange line that plummets during the winter.

The blue line is 2014 — that’s what Obama was dealing with. The orange line is 2017, when Trump came into office.

Fiscal year 2018 is the red line on the chart. Compared to 2017, it’s a big increase, because 2017 was so anomalously low. But in context, it’s more like a reversion to the norm of the past few years.

It’s worth noting, by the way, that if this chart went back to 2000 or so, the past few years would all look pretty small in terms of border crossings. Unauthorized immigration into the US is still way down from historical levels. That drop has been especially pronounced among single adults coming for work — of the people still coming in, a lot of them are children, families, or other asylum seekers.

Reversion to the Obama-era norm isn’t what the Trump administration wanted, though. The president took a ton of pride in the low number of border crossings in the early months of his term — he kept bragging about it even as apprehensions crept back up in fall of 2017. When he started realizing that people were still coming in to seek asylum, he got upset that the US couldn’t just shut down the border — and pushed into action a policy agenda that would crack down on anyone trying to come to the US without papers, especially if they crossed into the country illegally.

Obama in 2014 took a mostly punitive approach to border crossers. Trump in 2018 took an entirely punitive one. But Obama was reacting partly to circumstances; Trump was reacting solely to his own desires.

Both presidents prosecuted many border crossers. But Trump’s “zero tolerance” policy created family separation.

Prosecuting people for illegal entry into the US is not new. Illegal entry and illegal reentry have been the two most commonly prosecuted crimes in federal court for years — often via mass trials that basically prosecuted dozens of people at once. Obama didn’t start this trend, but he certainly continued it.

While people charged with illegal entry or reentry made up as much as half of all people prosecuted in federal court in April 2018, they still made up only 10 percent of all people Border Patrol apprehended for crossing into the US between ports of entry.

In other words, officials were still deciding not to prosecute a lot of people — or, at least, didn’t have the resources to prosecute a lot of people and so had to be deliberate in deciding who deserved to be prosecuted. As a general rule — though not always — people who said they feared persecution in their home countries and wanted asylum were not prosecuted. Neither were people who came to the US with their children.

In April 2018, however, Trump’s Justice Department (led by Jeff Sessions) announced that they would start prosecuting every illegal entry case referred to them by the Department of Homeland Security. And in May 2018, Sessions and the Department of Homeland Security announced that they would start referring everyone who entered illegally for prosecution: “zero tolerance.”

The Trump administration isn’t actually prosecuting everyone who crosses the border between ports of entry yet — or even the majority of them. But the implied corollary to the “zero tolerance” policy was that the Trump administration would no longer make decisions about whom to prosecute based on whether someone was seeking asylum — or whether they were a parent.

That meant that parents were now being referred into the custody of the Department of Justice — while their children were separated from them and reclassified as “unaccompanied minors.”

Trump made separating families a matter of standard practice. Obama did not.

It’s not that no family was ever separated at the border under the Obama administration. But former Obama administration officials specify that families were separated only in particular circumstances — for instance, if a father was carrying drugs — that went above and beyond a typical case of illegal entry.

We don’t know how often that happened, but we know it was not a widespread or standard practice.

Under the Trump administration, though, it became increasingly common. A test of “zero tolerance” along one sector of the border in summer 2017 led to an unknown number of family separations. Seven hundred families were separated between October 2017 and April 2018.

From May 7 to June 20, separating a family who had entered between ports of entry was the standard practice of the Trump administration. It was the default.

Trump administration officials denied family separation was a “policy” for legalistic reasons, but they affirmed that “zero tolerance” prosecutions were a policy. Until Trump signed an executive order on Wednesday allowing families to be kept together in immigration detention while parents were prosecuted, the administration maintained that separating families was an inevitable outcome of prosecuting parents.

Not every family was separated. But dozens of families a day were. At least 2,300 families were separated over those six or so weeks.

We don’t know how many families were separated under the Obama administration, but there’s no reason to believe that it numbered in the thousands even over the eight years that Obama was president. Because it simply wasn’t standard practice. Under Trump, it was.

Both presidents housed “unaccompanied” minors in temporary facilities — but under Obama, they’d pretty much all arrived in the US unaccompanied

The 2014 border “surge” was driven partly by an increase in families attempting to cross into the US from Guatemala, Honduras, and El Salvador. But it was primarily driven by an increase in “unaccompanied alien children” — people under 18, coming to the US without parents or guardians — from those same countries.

The federal government had a system to deal with unaccompanied kids, but it was underfunded and overloaded even before the 2014 “surge” — and quickly got backed up. As a result, Border Patrol ended up holding kids for days beyond the 72 hours they were legally supposed to, and the government had to spin up temporary holding shelters for children that looked a lot like jails.

Some of the pictures of these sites went viral again in 2018, with people either misidentifying them as pictures of children separated from their parents under Trump or as proof that Trump’s policy was identical to Obama’s. Neither is true.

The system for dealing with unaccompanied migrant kids is overwhelmed again now. Most of the children in its custody — about 10,000 — are minors, generally teenagers, who crossed into the US alone. But with the Trump administration’s “zero tolerance” policy in effect, the system has also had to absorb more than 2,000 children separated from their parents — who are often young children or even infants.

The temporary shelters that the government started constructing last week — which government officials call “soft-sided shelters” and the media has called “tent cities” — are one result of that overflow. The rise in “tender age” facilities, designed to hold children under 5 (as young as infancy), is another.

Many of the problems with the system for unaccompanied immigrant kids run deep — there are long-running concerns with Border Patrol abuse of immigrant youth, for example, and with proper screening of the sponsors with whom children are placed. Trump’s family separation policy brought attention to some of those problems. But the reason for the attention was that Trump was adding children to the system who weren’t unaccompanied until the government took their parents away.

Obama detained families together — until the courts stepped in

Obama’s response to the 2014 “border crisis” was to crack down on the people he could crack down on: adults, including asylum seekers, and families.

At the time, there were special protections (under the 1997 Flores settlement) that stopped DHS from keeping unaccompanied immigrant children in detention, but not children who had come to the US with their parents. So the Obama administration attempted to tamp down the number of Central American families seeking asylum in the US by keeping families in detention and processing and deporting them as quickly as possible.

Immigration advocates challenged the policy of family detention under the Flores settlement. Judges agreed with them — in large part because it said the Obama administration was out of bounds in detaining migrant families for the purpose of “deterrence.” (As NBC’s Benjy Sarlin has pointed out, that’s why certain Trump administration officials have been careful not to say that family separation is a deterrent, or even a policy, now.)

Ultimately, the Ninth Circuit ruled that the Flores settlement covered not just unaccompanied alien children but “accompanied” ones as well. It set a general standard that the government couldn’t hold them in custody for more than 20 days.

The Ninth Circuit stopped short of saying that parents could be released under Flores. But the federal government has since made a practice, for the most part, of releasing the whole family after 20 days. Since the current family detention facilities — two in Texas created under Obama, and an older one in Pennsylvania — are mostly full, they don’t have a ton of space to detain families anyway.

Until now.

Trump is now trying to regain the legal authority to do what Obama tried to do but was stopped from doing

The executive order Trump just signed, however, directs that families who enter without papers should be detained until their cases are completed — which, for families seeking asylum, can take months or years. The order opens up options to set up temporary facilities for families on military bases and elsewhere. And it directs the attorney general to ask the judge who applied Flores to “accompanied” children to undo that ruling.

At the same time, the Trump administration is pressuring Congress to override the Flores settlement entirely to allow families to be kept together in immigration detention facilities for as long as it takes to approve their claims — or, more likely, deport them.

We don’t know much about the conditions in which families will be housed, or what access they’ll have to legal counsel. But it’s likely that family detention under Trump will look similar to the way family detention did in 2014 — with some families getting basically no due process before getting deported, and others remaining in detention for weeks or months — before the courts stepped in and told the federal government it couldn’t do that.

In other words, it’s not really about what Obama or Trump did. Right now, the question is what they are allowed to do.