MADRID (Reuters) - Two men were arrested in Madrid on Wednesday on suspicion of spreading Islamist militant propaganda, the Interior Ministry said.

Police released video footage that showed officers uncovering gun magazines and bullets from under rocks in a disused building covered in graffiti in the outskirts of Madrid.

They uncovered four Kalashnikov AK-47 magazines and over 30 bullets but no weapons, the ministry said, adding that the arrested men were Spaniards of Moroccan and Gambian origin.

Separately, two women who traveled to Syria in 2014 from the Spanish north African enclave of Ceuta were arrested in Turkey as they attempted to return to Europe, the ministry said.

The women had gone to Syria with their Islamist militant partners in order to join Islamic State, the statement said.

The women were attempting to make the return journey with young children, and Turkish authorities arrested them after tip-offs from Spanish police.

Spain has arrested 177 people in connection with Islamist militancy since 2015, when it raised its security alert level to 4 out of 5 after an Islamist militant attack on the satirical magazine Charlie Hebdo in Paris.