BRASILIA (Reuters) - A Brazilian federal appeals court judge on Tuesday overturned a ruling barring Venezuelan immigrants fleeing economic and political turmoil from entering Brazil.

Slideshow ( 3 images )

On Sunday, a federal judge in the northern state of Roraima ordered the border closed until the state could create “humanitarian” conditions to receive a massive of Venezuelans.

Appeals court judge Kassio Marques acknowledged “grave violations of the public and judicial order,” but overturned the lower court’s ruling, saying the closure would not improve humanitarian conditions for Venezuelans fleeing their country.

A Foreign Ministry official said the Brazilian government does not contemplate at all closing the border because that would violate its international commitments on human rights and a new immigration law that keeps the door open to all refugees.

The Roraima state government, which has been trying to shut the border to stop the influx of Venezuelans, said it would appeal the latest court decision and seek 184 million reais in federal compensation to cover its additional costs in health, education and public security.

Over the last three years, tens of thousands of Venezuelans have overwhelmed Roraima, causing a humanitarian crisis with families sleeping in the streets amid rising crime and prostitution.

The federal police said that it never actually closed the frontier and had only begun preparations for shutting it on Monday, but the normal flow of Venezuelan immigrants was re-established on Tuesday morning.

A state government official in Roraima said that although the federal police never closed the border, officers did momentarily stop Venezuelans from entering.

“They only let pass those who had been granted asylum, residency or could prove they had passage out of the country,” the official told Reuters. “There was even a little protest.”

The U.N. Refugee Agency (UNHCR) welcomed the Brazilian judiciary’s decision.

Nearly 33,000 Venezuelans had asked for asylum in Brazil as of April 30, while another 25,000 had entered the country by other means, including humanitarian visas, labor and migration visas, UNHCR spokesman William Spindler said in Geneva.

“In 2018, the number of asylum seekers from Venezuela is already larger than for the whole of 2017,” he told reporters.

Venezuela is in the grip of a severe economic crisis, with shortages of food, medicines and other essentials, and periodic waves of protests against leftist President Nicolas Maduro.

The Brazilian Air Force began flying Venezuelan immigrants in Roraima to other cities of Brazil in May and has so far flown more than 800 Venezuelans out of Boa Vista, the state capital.