Bomb squad officers safely detonated the practice device, which had a small amount of explosive, after it was found on the patio of the reception centre in the neighbourhood of Hortaleza.
A police spokesperson said the explosive was found by staff shortly before 9am on Wednesday after it was thrown into the centre’s grounds inside a plastic bag, The Guardian reports.
The centre was evacuated as a precaution and the children moved to a safe place.
The reception centre has been the target of a spate of recent attacks, including one which saw about 30 youths attempt to enter the site in October, according to Spanish daily newspaper El Pais.
Isabel Serra, spokesperson for the left-wing political party Unidas Podemos, tweeted in reaction to the incident: “The criminalisation of unaccompanied migrant children has these effects.”
“Monasterio, the one that points them out, is responsible,” she added, in reference to Rocio Monasterio, leader of the Madrid branch of far-right anti-immigration party Vox.
Ms Monasterio has previously claimed menas, the Spanish word for unaccompanied foreign minors, are “a serious problem”.
The centre in Hortaleza was recently thrown into the spotlight after Vox leader Santiago Abascal, who lives in the neighbourhood, claimed its residents had left people living in the area feeling unsafe.
He told a TV debate last month: “Every time I’m on the street I run into women who come and tell me that the police tell them not to wear their jewellery on the street; and mothers who are worried that their daughters are coming home late and are scared of being assaulted.”
A group of residents have joined forces with Vox and far-right group Hogar Social to call for the centre to be closed, according to El Pais.