Madrids deputy mayor called for calm on Friday following violent clashes between police and protesters demonstrating in anger over the controversial death of a Senegalese street vendor.
Authorities arrested six people during the protest in the Lavapies district of the Spanish capital on Thursday evening, which saw demonstrators set fire to dustbins and motorbikes, and throw stones at riot police.
At least 10 police officers were injured in the unrest, police said, while emergency services said four people were slightly hurt.
"We understand the spontaneous expression of pain that took place in our streets yesterday (Thursday)," Deputy Mayor Marta Higueras told reporters, replacing Mayor Manuela Carmena who was in Paris but decided to cut her visit short to return to Madrid.
"We want to call for calm," Higueras said as Lavapies remained tense on Friday, with several dozen migrants clashing again with police in the morning, throwing chairs at security forces, and a protest planned in the early evening.
Candles had been lit on the street where Mame Mbaye Ndiaye, a 35-year-old man from Senegal, died of cardiac arrest in as-yet undetermined circumstances.
Mbaye is one of many street vendors in Madrid who lay out items like perfume or hats on white sheets, which they can quickly pick up and take away when the police arrives.
While illegal, the trade is often the only way to make a living for migrants struggling to find other employment.
According to city councillor Jose Javier Barbero Gutierrez, Mbaye had been selling his wares on the central Puerta del Sol square, which attracts scores of tourists daily, when police intervened.
Fellow vendors said police chased him through the streets, forcing him to run with his heavy merchandise wrapped in a sheet.
He died of cardiac arrest in a street close to his home in Lavapies some 15 to 20 minutes later, Barbero said.
But he added that for at least the last part of the way home, Mbaye did not appear to have been tracked by police.
When he suffered the cardiac arrest, he was with a friend who called the police. Several officers arrived and tried unsuccessfully to resuscitate him.
The city hall has asked for CCTV footage to try and determine exactly what happened, as the plight of street vendors in Spain suddenly lept to the fore.
Barbero said that Mbaye had been living in Spain for 12 to 15 years without proper ID, "without the possibility of finding a proper job," adding living in these conditions caused "unhealthy chronic stress".
He called for reflection on "the way they experience daily situations of fighting for survival, when you constantly escape from the police, with the constant fear of being arrested."
According to Modou, a 25-year-old vendor from Senegal who refused to give his surname and knew the victim, Mbaye regularly sent money back to his family.
He was one of thousands of migrants who have reached Spain over the years in search of a better life.
Spain is the third busiest gateway for migrants coming to Europe, with more than 28,000 arrivals in 2017 by sea and by land, according to the International Organization for Migration. Hundreds have died along the way.
Anti-racism association SOS Racisme denounced that Mbaye was not able to get a residency permit after more than a decade in Spain.
Human rights groups regularly criticise the way migrants are dealt with in Spain, with detention centres often full, and limited access to asylum demands at the border.
Spain has a population of 46.5 million, among whom 10 percent are foreign, with some 64,000 from Senegal.