A Brazilian federal judge has ordered the country's border with Venezuela to be closed to migrants fleeing that country's economic meltdown, though the frontier has remained open while the government appeals the decision.

Judge Helder Barreto ordered the border closed until the northern state of Roraima can create the "humanitarian" conditions to handle the influx, Reuters reported. State officials told the news agency that more than 500 Venezuelans cross into Roraima on average every day.

The incursion has overwhelmed social services and led to homeless families sleeping in the streets amid rising crime and prostitution, among other concerns. The migration also has triggered an outbreak of measles; many Venezuelan refugees have not been immunized due to the breakdown of the health system there.

As part of his ruling, Barreto ordered the vaccination of all Venezuelans admitted to Brazil. He also suspended a local measure permitting the expulsion of Venezuelans who broke the law, as well as a decree requiring Venezuelan immigrants seeking medical and social services to have a valid passport.

However, he also ordered that the entry of Venezuelan refugees be halted until Roraima has reached an equal number of people entering the state and leaving for other parts of Brazil.

The Brazilian Air Force has flown approximately 820 Venezuelans out of the state's capital, Reuters added.

A border official told the news agency that hundreds of Venezuelan refugees continued to cross the border Monday.

Click for more from Reuters.