At least seven police officers have been injured in clashes with protesters as tens of thousands of people marched through Madrid, demanding the resignation of Prime Minister Pedro Sanchez after a series of corruption scandals.
A small group of protesters tried to break through barriers around Sanchez's residence during Saturday's rally, which was otherwise largely peaceful.
Police detained a group of masked people on the main road approaching the Moncloa Palace, where the Socialist leader lives with his family, images on Spanish television showed.