But none of them were actually there.
The demonstrators were taking part in what organizers described as the world's first hologram protest.
They used equipment to project the marchers' holographic forms in front of the Congress of Deputies, the lower house of the national parliament, for about an hour on Friday night.
But the ghostly demonstration was more than just a technological stunt. It also highlighted some of the constraints in the new Citizen Safety Law, which critics have dubbed "the Gag Law."
"Our protest with holograms is ironic," said spokesman Carlos Escano, according to the Spanish newspaper El Mundo. "With the restrictions we're suffering on our freedoms of association and peaceful assembly, the last option that will be left to us in the end will be to protest through our holograms."
Law turns 'a right into an offense'
Under the new law, which is set to come into effect in July, protesters will run the risk of a range of punishments, depending on the circumstances. They include a possible fine of 30,000 euros ($31,800) for protesting in front of the Congress or other parliament buildings, according to the text of the law
, which was published in March.
The law "restricts citizens' liberties and criminalizes their right to protest," the organizers of the hologram demonstration say, "turning a right into an offense for which you can be pursued, detained and judged."
To challenge the legislation passed by the governing Popular Party, the activists called on people all over the world to volunteer to become a hologram in the protest. Supporters could take part in the weeks running up to the protest by allowing a webcam to film their face through the campaign's website
The movement against the changes to the law, named "We are not crime," brings together more than 100 different organizations.