Spain's National Police Headquarters admitted on Wednesday that a number of secret agents infiltrated Tuesday's protests against the conservative government, according to El Huffington Post, though police denied social media rumors that secret agents had provoked the violence.

Riot police that took part in the demonstration on Tuesday also allegedly did not have regulatory badges, making it difficult to file potential complaints of police abuse.

On Tuesday, Spain's Parliament morphed into a heavily-guarded fortress, as dozens of police blocked access to the building hours before protests against the government's handling of the economic crisis. The demonstrators, organized behind the slogan "Occupy Congress," called for Parliament to be dissolved and for fresh elections to be held.

Government cuts and austerity measures adopted since December 2011 have caused deep discontent in the Iberian country.

The evening started quietly, with the head of the Police Intervention Unit even commenting: "There are far fewer people than planned, but that does not mean anything. You have to wait for it to end." He later added that "notifications through social networks are always unpredictable," according to a HuffPost translation.

By 8 p.m. Tuesday, 6,000 people had gathered in Madrid's Neptune square, screaming anti-government slogans as police vans formed three security rings around Parliament.

As the evening progressed, police forces struck demonstrators with batons, while thousands of angry protesters, referred to as "indignados," gathered around the Parliament, Le Figaro reports. Some protesters hurled projectiles at the police.

"These are our weapons," shouted demonstrators, raising their arms to the sky while anti-riot police tried to disperse the crowds. Police later charged demonstrators again, with some of the protesters' faces hidden by balaclavas.

By Wednesday morning, 38 people were arrested, ABC reported, and 27 of the 64 people injured were police.

The government told El Pais that the police response deserved praise, saying "It was a prudent and proportionate action and we congratulate police forces for preventing a sabotage of the rule of law that was intended against Congress."

Extreme left parliamentarians, however, were concerned by the use of police reinforcements, saying the deployment was excessive. The opposition party said the government should be more concerned with Spain's image abroad as international media outlets show a country embroiled in social protests.

Loading Slideshow...
  • A protestor holds a sign which reads, 'The Coup d'Etat is inside [parliament],' before a demonstration surrounding the Spanish parliament to protest against spending cuts and the government of Mariano Rajoy.

  • Spanish riot police fired rubber bullets and charged protesters as thousands rallied near parliament in Madrid in anger over the government's handling of the economic crisis.

  • A protestor demonstrates bare-breasted near the Spanish parliament during a protest against spending cuts and the government of Mariano Rajoy.

  • An injured woman lies on the street during a demonstration organized by Spain's 'indignant' protesters to decry an economic crisis they say has 'kidnapped' democracy.

  • Two indignados wearing masks.

  • Protestors perform and hold a banner reading: "Without fighting, what will you get?" as they prepare to march to the Parliament.

  • A protester holds a placard reading, 'For Sale - Spain.'

  • A protester wears glasses with the euro and dollar symbols painted on the lenses before a protest march toward the Parliament.

  • Protestors hanging from the windows during the demonstration at the Parliament against austerity measures announced by the Spanish government.

  • Protestor holds his hand up showing a caption reading, "The People for the People."

  • Protestors hold a banner reading, "You Don't Represent Us."

  • Protestors hold a banner reading, "Everyone Should Leave."

  • The owner of a bar argues with a riot police officer while demonstrators look for shelter inside the bar during the demonstration.

  • Spanish police in full riot gear kick a demonstrator during the march to the Spanish Parliament.

  • A couple of tourists try to get to their hotel trough a street closed off by Spanish police during the march.