A supreme court judge in Brazil Tuesday rejected the Roraima state government's appeal to close the country's border with Venezuela, which was blocked by the police a day before following an earlier ruling by a federal judge.

Judge Rosa Weber said that judge Helder Girao Barreto must be notified of her ruling on the border to be reopened.

Judge Barreto Sunday ordered the temporary closing of the border from where Venezuelans were entering the state of Roraima until there is a balance between the number of immigrants coming into the state and the number of people heading towards other cities.

Barreto's ruling came into effect at 5 p.m. Monday.

However, a few hours later, Weber delivered the judgment on a petition filed by the Roraima government, the main gateway for Venezuelans to enter Brazil, overruling the earlier order of closing the border, arguing that it was against the Constitution and the international treaties ratified by Brazil.

Brazil's Human Rights Minister Gustavo Rocha, reiterated in a statement published Monday that closing the Brazilian border with Venezuela is non-negotiable, a view shared by Brazilian President Michel Temer.

In April, Roraima governor Suely Campos of the conservative Progressistas Party demanded the border be closed temporarily as the federal government failed to control it and it was overburdening the state.

At the time Temer criticized her demand and said that Brazil was not in the habit of closing its borders.

Roraima, one of the poorest states of Brazil, has received nearly 50,000 Venezuelans which has significantly elevated demands on regional public services.

The government claimed that it was not capable of meeting this demand.

In February the Brazilian government declared a situation of vulnerability in Roraima and since then has introduced humanitarian assistance programs for Venezuelan immigrants, with the help of the army and international organizations and which includes transferring the immigrants to other regions of the country.