A U.S. Immigration and Customs Enforcement (ICE) agent waits as an undocumented man, not pictured, is deported to Mexico at the U.S.-Mexico border in San Diego. (David Maung/Bloomberg)

Fatma Marouf and Michael Kagan are associate professors of law at the University of Nevada at Las Vegas. Rebecca Gill is an associate professor of political science at UNLV.

If you get a speeding ticket from a traffic cop, you have a right to fight it. And you don’t have to pay the fine until the case is resolved in court.

But things are different if the Department of Homeland Security seeks to have you deported. In theory, you have the right to fight your deportation, potentially all the way to the Supreme Court. But the DHS might deport you before you’ve exhausted your appeals.

That’s what happened in June to a mother and daughter who were deported from a detention center in Pennsylvania to Guatemala — where they feared becoming victims of violence — less than two weeks after appealing in federal court. In an extraordinary step, Theodore McKee, the chief judge of the U.S. Court of Appeals for the 3rd Circuit, ordered the government to find them and “return them to the United States as quickly as possible.”

The good news is that the mother and daughter were located in a remote area of Guatemala and allowed to return to pursue their appeal; they were released from federal detention the day they arrived. But the bad news is that their ordeal was the entirely predictable result of a gap in our system of justice, and the same thing is likely to happen to others if the courts, Congress and the president do not act to fix the problem.

The gap relates to a technical legal procedure that has dramatic human consequences. When the administrative authorities order individuals removed from the United States, those people have the right to appeal to a federal court. But the DHS can still deport them immediately, unless the court issues a stay of removal.

We have spent the past three years researching the ways federal courts adjudicate immigration appeals, starting with how they handle requests for such stays. We analyzed more than 1,600 appellate dockets from every part of the country, and we concluded that the system is broken.

One problem is illustrated vividly by the Guatemalan mother’s case. Her lawyer filed her appeal June 9 and immediately asked for a stay of removal, and the court gave the government two weeks to respond. But before the government had even stated a position in court, the DHS put the woman and her daughter on a plane to Guatemala City.

We do not know for sure how often this kind of deportation happens, because there will be no record of it in the public court docket unless a court issues the kind of extraordinary order that McKee did. But the danger is built into the system, even though there is a solution available. In the 9th Circuit, which includes nine Western states and has the largest immigration docket in the country, a stay is automatically ordered as soon as a petitioner asks for one, and it remains in place until the government responds and the court has the opportunity to rule on the merits of the request. If this simple system had been in place in the 3rd Circuit, this deportation would not have happened.

But even when courts have the chance to make a decision, the system is prone to life-threatening errors. To decide whether to grant a stay of removal, a court must decide whether the immigrant is likely to eventually win her appeal. But in our research, we found that in about half of the appeals that were ultimately successful, the court initially guessed wrong and denied the stay, leaving an immigrant at risk of an errant deportation.

We also found that government lawyers sometimes opposed stays of removal only to agree later to vacate the deportation order and allow new hearings. In other words, in cases where the government indicated it wanted to deport a person quickly, its lawyers later conceded that there might have been errors in the adjudication.

These gaps can be closed. Congress should consider amending immigration law so that deportations are not carried out until all appeals are exhausted. But even if Congress does not act, courts should not set too high a standard for stays of removal, especially in high-stakes cases. In the early stages of an appeal, it is simply too difficult for judges to predict how a case will go.

Finally, President Obama also could fix this problem. We are not asking him to stop all deportations. But the administration is under no obligation to deport people as quickly as possible. It should not be too much to ask that the government wait for the courts to have their say. That is the essence of the rule of law.