On the morning of Dec. 9, Roberta Alvim was sitting in her office when she received a call from a friend, João Carlos Jarochinski Silva.

She had met him a few months before at a conference on human trafficking at the University of Roraima, in Boa Vista, Brazil. As a federal public defender, Alvim had just been posted to Boa Vista, the capital of the state of Roraima. Jarochinski Silva, a professor of international relations with extensive experience researching migrations in the Amazon, was teaching at the university. Their fields of interest overlapped. As they left the conference they exchanged cards and proposed to keep in touch.

“Roberta,” he said urgently over the phone, “I am at the Federal Police station. They have rounded up hundreds of people, women and children. A lot of them are indigenous. I think they speak Warao. They are going to deport them all.”

“When?” she asked.

“Today.”

Overnight, the police had begun rounding up people living on the streets of Boa Vista. The large majority of them were indigenous people of the Warao tribe, who migrated from their ancestral home in the delta of the Orinoco river, in northeastern Venezuela, trying to escape the hardship of a failing state. But in Roraima, where political and racial tensions are traditionally high (proportionally, Roraima has the highest indigenous population of the country), a further influx of indigenous people was not taken lightly by the local authorities.

By mid-afternoon, the police were ready to start the mass deportation. The asylum procedures, customary in these circumstances, could not possibly have been respected in the few hours between the roundup and the decision to expel them.

“It’s simple math, really,” recalled Alvim, sitting on a suede couch in the office of an NGO in Geneva a few months after the incident. “Let’s assume you have all the 450 people rounded up by 7 a.m. in the Federal Police station, and let’s assume you have ready an official translator who is fluent in both Warao and Portuguese. You’d still have only less than two minutes per person to assess their asylum status. That’s just impossible.”

Following the same logic, on Dec. 9, Alvim decided to draft a collective habeas corpus — a legal recourse in which an unlawful detention can be reported to a court and which requires the court to determine if the detention is lawful.

As the bus filled with Venezuelan migrants headed for the border following the Federal Highway-174, an almost straight line cutting through the state, hopes to stop the mass deportation decreased with each passing kilometer.

Then the bus broke down.

“Can you believe it?” Jarochinski Silva told me jubilantly over the phone. “I mean, the Federal Court was very quick in accepting Alvim’s habeas corpus and in ruling on it, but probably without that bus it wouldn’t have worked.”

After a few hours, they’d got the bus moving again, but just a few kilometers from the border the bus stopped again, this time to turn back towards Boa Vista.

No more mass deportations have been registered since then. But this was not an isolated case, and for Venezuelan migrants scattered across Brazil, their hardship is far from over.