BRASILIA (Reuters) - A Brazilian judge has ordered the border crossing from Venezuela closed to Venezuelan immigrants fleeing their country’s economic and political turmoil but the border remained open on Monday pending an appeal by the federal government.

Slideshow ( 3 images )

Hundreds of Venezuelans continued to walk across into Brazil, a border official said.

Federal judge Helder Barreto on Sunday ordered the border closed until the frontier state of Roraima can create “humanitarian” conditions to receive the massive and disorderly influx. But the injunction has not gone into effect yet pending an appeal by Brazilian government lawyers.

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

The state government on Thursday decreed Venezuelans seeking medical and other social services in Roraima would have to present a valid passport, which many of the refugees do not have.

Barreto ruled that such a measure was “discriminatory” and countered Brazilian laws. He suspended a provision that would allow the deportation or expulsion of Venezuelan immigrants who committed illegal acts and ordered the vaccination of those admitted to Brazil.

However, he ordered the suspension of the entry of Venezuelans into Roraima until the state can reach an equilibrium between the arrival of migrants and their exit to other parts of Brazil.

Following recommendations by the U.N. refugee agency UNHCR, the Brazilian Air Force in early May began airlifting Venezuelan immigrants from Roraima for resettlement in other cities of Brazil.

To date, some 820 Venezuelans have been flown out of Boa Vista, the state capital, by the Air Force. But state officials say more than 500 Venezuelans cross into Brazil every day on average and many stay in Roraima because they cannot afford to move on.

Brazil’s federal government has declined requests by Roraima’s governor to close the border. Solicitor General Grace Mendonça renewed an appeal to the Supreme Court on Monday to suspend the state decree restricting services for Venezuelans, saying it interfered with federal powers.