Street vendors in major Spanish cities have found themselves at the centre of an immigration row as rightwing political parties try to reverse their poll slump.

The Popular party and the Citizens party – flailing since Pedro Sánchez’s socialist party came to power in June – have followed their attacks on migrant ships by targeting street vendors, the majority of whom are undocumented immigrants from west Africa.

The vendors, known as manteros because they sell their wares from blankets (mantas) spread out on the pavement, sell pirated designer goods imported from China: mostly handbags, sunglasses and sports shoes.

Speaking in Algeciras in southern Spain on Monday, Ignacio Cosidó, the Popular party’s spokesman, sought to link manteros with crime in Barcelona.

“Crime in Barcelona is up 20% in a year,” he said. “I’m not saying this is the only reason but to ensure our coexistence and security we need to have secure borders.”

His words echo those of Albert Rivera, leader of the centre-right Citizens party, who said last week: “It’s time to bring order to the streets, order and security. We will fight the mafias and make sure the law is obeyed.”

The number of manteros is thought to have increased in recent years. There are between 1,000 to 2,000 in Barcelona, with as many as 500 operating in Madrid, as well as in coastal resorts.

Last week a fight broke out between manteros and tourists in central Barcelona, although there were conflicting accounts about who started it.

Last year there was rioting in the Lavapiés district of Madrid after a street vendor named Mame Mbayi died from a heart attack after allegedly being chased by police.

The biggest concentration of manteros is in Barcelona, where during the summer months they flock to the beachfront district of La Barceloneta as well as the central Plaça de Catalunya.

Laia Ortiz, Barcelona’s acting mayor, said the issue was complex, both legally and socially, but that the main issue was the manteros’ occupation of public space.

Legitimate businesses complain of unfair competition and Ortiz said that in the past year more than 1 million pirated artefacts had been confiscated, although the manteros insist the market for their fake Michael Kors handbags and Ray-Ban sunglasses is not the same as those who buy the real thing.

“We can’t separate the phenomenon of street vendors from tourism because tourists are their target market,” Ortiz told the Guardian. “We are trying to address this in two ways. Firstly, there can be no impunity and we have to free up public space but at the same time we have set up cooperatives and are helping these people to integrate.”

Lamine Sarr, spokesman for the Manteros Union, who is from Senegal and has lived in Barcelona for 10 years, denies that it’s about public space.

Barcelona at night. The city has the biggest concentration of manteros in Spain. Photograph: MartiGarcia/Getty Images/iStockphoto

“If you go to La Rambla or Sagrada Família, the public space is occupied by tourists. But when the space is occupied by poor black people, everyone complains. It’s about racism – that’s all there is to it.

“The solution is to create jobs and to fight against the immigration law,” he said. “The people who work in the street don’t want to be there but it’s a question of survival.”

The irony is that, while Spaniards are rightly proud of their humanity in opening their ports to refugees, under the current immigration law most of the new arrivals will not be allowed to work legally and many will end up as manteros.

Immigrants from outside the EU must have a work contract if they are to enter the country legally. If they find work after they arrive, they have to return to their country of origin to obtain the necessary paperwork. In the case of most of Spain’s undocumented migrants, who have come ashore in rubber dinghies, often fleeing war and persecution, this is clearly impossible.

In the absence of a government amnesty, they are condemned to live forever on the margins, looking over their shoulders for the police who, overwhelmed by the scale of the problem, tend to vacillate between harassment and indifference.

“This is the big contradiction within Spanish law,” said Ortiz. “We can’t welcome these people then deny them the right to work. We need to address this from a human rights perspective, starting at the European level, because otherwise it’s hypocrisy to reduce it to a conflict over public space when it’s really much more complex.”

Meanwhile, in the past 24 hours 525 migrants have been either rescued or come ashore in southern Spain, including a child attempting to paddle across the Strait of Gibraltar on a lilo.

In due course, many of these people will become street vendors, scratching a living selling pirated copies of luxury goods to tourists.