Updated

Spain's capital is grappling with the aftermath of violent unrest following the death of an African street vendor who had been running away from police officers.

The death, and the clashes between riot police and protesters that followed late Thursday in a central Madrid neighborhood, cast a spotlight on the precarious situation of a large community of undocumented migrants.

Madrid Mayor Manuela Carmena announced a "thorough investigation" into the death of the man. According to city officials, he was treated for a cardiorespiratory arrest that took place an unspecified time after he escaped a police crackdown on informal street sales earlier Thursday.

Subsequent protests by hundreds of African migrants and Spanish residents degenerated into rioting. Demonstrators burned plastic trash cans, blocking narrow streets and setting fire to a bank branch. An Associated Press reporter saw protesters throw stones at dozens of riot police officers.

Police said that six people were arrested. Emergency services said 20 people were treated for minor injuries, including 16 police officers.

Migrants' associations have identified the dead man as 35 year-old Mbame Ndiaye, a Senegalese who had lived in Spain for 14 years and had not been granted residency. They accused police of playing a role in his death, but local police unions said it had nothing to do with the crackdown on street vendors.

Atu Baye, a fellow Senegalese migrant and neighbor of Ndiaye, told The Associated Press that Ndiaye often joined groups to sell wallets, bags or other products.

"There were extremist groups infiltrated who burnt things. The Senegalese are not breaking things or stealing, they are not hurting anyone," said Cheikh Ndiaye, the president of AISE, an association of Senegalese migrants in Spain, who referred to the death of Ndiaye as "a racist attack" and a "violent criminal act of the state."

A police union representative said that officers patrolling the area tried to help the man while medical help arrived.

"Contrary to what is being said, the agents were trying to revive him," said Emiliano Herrero, secretary general for CCOO, a national labor union, in the Madrid police.

Herrero said the mayor's announcement of an investigation seemed to "cast a doubt over the work of a professional police body." He said the judiciary should investigate such matters.

"Street sales by a collective of people who are not given the chance to work are a social and political problem that needs to be solved by politicians and legislators," Herrero said. "It's very easy to put the blame on the weakest link."

But Malick Gueye, a representative of the Madrid Hawkers and Tinkers Union, said that the vendors face increasing police abuse. Because most of them lack regular papers, they find it difficult to take matters to court, he said.

"People sell goods in the street because Spain's migration law says that people are not allowed to work and integrate in this country," Gueye added. "Migration laws condemn us to a clandestine life."

__

Video journalist David Montero contributed to this story.