Brazil could have had one of the world’s most progressive migration bills but Islamophobia and xenophobia killed it.

In the midst of a global refugee crisis, Brazilian congress has approved a new migration law, considered initially by many specialists as a breakthrough. Yet, after the bill was unanimously approved by the National Congress in May, pressure from right-wing politicians, the security forces, and extreme right-wing activists forced President Michel Temer to disfigure the law into something unrecognisable by vetoing several items in it.

The new Migration Law will be replacing the previous Statute of the Foreigner, a bill inherited from the military dictatorship, which among its other ills, treats any foreigner as a potential threat – something quite odd considering Brazil is a nation built on the migration of peoples from different parts of the world.

Under the new law, foreigners may find it easier to deal with the unnerving bureaucracy of the Brazilian migratory system. The bill also has several precautions against discrimination and xenophobia and it gives the migrants the right to unionise and participate in political demonstrations.

However, despite all these positive qualities, after Temer’s 20 vetoes, the law transformed into a text focusing on national security rather than the rights of migrants.

For instance, Temer vetoed a part of the proposed law that would have granted Brazilian indigenous population the right to freely move over national borders. Another veto by Temer opened the way for migrants that have been convicted of a crime in Brazil to be expelled from the country.

According to Mauricio Santoro, a professor of international relations at the Federal University of Rio de Janeiro, the vetoes “are significant and meet the pressures coming from the police and the military”. Moreover, he says, they mainly “affect sections of the law relating to indigenous peoples, the regularisation of immigrants who arrived in Brazil without adequate documentation, and the possibility of foreigners occupying public posts”.

No amnesty or free healthcare

Another heavily criticised veto by Temer made healthcare, which is universal and free for Brazilians, not accessible for foreigners. The president also vetoed a section of the law that would have allowed migrants to work as public servants. Under the amended proposal, a foreigner’s chances of becoming a public servant are heavily restricted.

“The justification for the veto in this case was not only discriminatory, but also biased,” says Juliana Vitorino, a professor of International Relations from University Center Estacio of Recife.

She adds that, in its amended form, the new law of migration agrees with the general spirit of the Statue of the Foreigner. “It does not stray too far from the Statue of the Foreigner, regarding the continuity of legislation that presses more for control and security bias.”

OPINION: There is no justice for the poor in Brazil

International law professor Deisy Ventura, from the University of Sao Paulo, says Temer’s most problematic veto to the new migration law was to the article 188, which was originally designed to grant amnesty to migrants who arrived in Brazil before June 6, 2016 without necessary documents. According to Ventura, the veto was “based on the mistaken understanding that an amnesty would have reduced the discretion of the Brazilian State”.

Ventura adds that she believes that the Federal Senate will not overturn the vetoes of the president as the current political environment in the country and the threats of impeachment against Michel Temer would not allow for the necessary pressure to be applied. So it is widely expected for the law, in its amended form, to come in to force in approximately 180 days after a second confirmation in the senate.

The amended final draft of the bill is a positive, albeit small, step towards the right direction. Unfortunately, it still differs little from the former Statute of the Foreigner in some key points, to the great concern of experts.

The influence of the right wing

The original text of the migration bill, which was approved unanimously by the senate, faced enormous resistance from not only the Brazilian Armed Forces and the Federal Police, but also fringe right-wing groups.

Before the bill was put before the Federal Senate in May, dozens of protesters gathered at Paulista Avenue in Sao Paulo. They were chanting slogans against immigration, but most of their anger was directed at Muslims.

The demonstration, which was small in numbers but big in its impact, was organised by the members of a fascist Facebook group called “Direita Sao Paulo” (Right-wing Sao Paulo). The group chanted slogans against what they called the “Islamisation” of the country. They called Brazil’s Foreign Affairs Minister Aloysio Nunes, who proposed the new migration bill, a “traitor”. They also called for and a military intervention and a new dictatorship in Brazil. As expected, the protest was countered by left-wing activists and several people were arrested as a result of the skirmish that ensued. The same fascist group staged another small demonstration in the following week, but this time they did not face any confrontation.

Of course, these demonstrations were not the sole reason behind Temer’s regressive vetos on the migration bill, but they clearly showed that anti-migration sentiments are becoming more vocal in the Brazilian society.

Several politicians also jumped on the anti-migration bandwagon and criticised the proposed migration law for being too migrant friendly. For example, Jair Bolsonaro, a representative from the state of Rio de Janeiro and possible presidential candidate in the 2018 elections, released a series of videos and statements against the original version of the draft law saying “Brazilians will face the consequences of the inconsequence that will be voted”. Bolsonaro has the support of several fringe right-wing groups and he is rapidly growing in the polls.

READ MORE: Brazil – Targeting trans people with impunity

With a population over 200 million, the number of migrants in Brazil is just below two million, constituting a mere 0.9 percent of the total population. The number of migrants from Muslim countries is even more minuscule, as not a single Muslim country makes it into the list of the top 10 countries which migrants to Brazil come from.

It is not to say that Brazil did not receive a number of Muslim, and specifically Syrian, refugees in the past couple of years. According to the National Committee for Refugees, in 2015, Brazil welcomed 1,700 Syrian refugees – making it the country hosting the highest number of Syrian refugees in Latin America. While the influence of Islam in Brazil has been growing visibly in the last couple of years, it is not possible to talk about the “Islamisation” of the Latin American giant.

The ‘terror’ factor

The rise of the right-wing, Islamophobic discourse in Brazil coincides with the implementation of an anti-terrorism law that had been sanctioned in March 2016 by the then President Dilma Rousseff. Several social movements and NGOs argued that the anti-terror law was too over-reaching and that it can be used to punish anyone taking part in peaceful political demonstrations, but did not succeed to halt its implementation.

In July of that year, using the powers granted to them by the controversial anti-terror law, security forces arrested a group of 10 Brazilians who recently converted to Islam for allegedly plotting an Islamic State of Iraq and the Levant (ISIL, also known as ISIS) attack. The evidence presented during their trials showed that the suspects’ efforts were highly amateurish and sloppy, but the case nevertheless increased tensions in the country. Later that year, the police arrested a further 15 suspects, as part of an operation dubbed “Hashtag”, for allegedly plotting on social media and on WhatsApp to commit terror acts. Eight of the suspects were eventually convicted and received penalties ranging from five to 15 years in jail.

These convictions fuelled the right-wing anger towards Muslims, as well as the concerns of the state security apparatus. As a result of the frenzy caused by these convictions, Brazil’s pre-existing xenophobia and anti-migrant sentiments met with Islamophobia, the fear of refugees from Muslim countries and the fear of Brazilian youths being converted into a “foreign” religion to carry out terror acts.

Brazil is a country that historically welcomed refugees and migrants from all over the world and built a national identity based on the juxtaposition of different cultures. Brazil did not reach to this “melting pot” status without going through conflicts, tensions and setbacks, but today this multiculturalism, this ability to recognise the country’s diverse ancestry, is part of what means to be a Brazilian.

The new Migration Law was initially drafted to ease the pressure coming from different social actors, NGOs, political and human rights activists regarding the grave condition of migrants’ rights in Brazil. Yet it faced opposition from forces within the state, as well as right-wing groups and ended up disfigured. The amended final draft of the bill is a positive, albeit small, step towards the right direction. Unfortunately, it still differs little from the former Statute of the Foreigner in some key points, to the great concern of experts.

Raphael Tsavkko Garcia is a journalist and a PhD candidate in human rights at the University of Deusto in Spain.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial policy.