Riot police detain a protester during the protests in Madrid on Tuesday night. SERGIO PÉREZ / REUTERS

Police fired rubber bullets and beat people with nightsticks on Tuesday night as an organized demonstration outside the gates of Congress turned violent, with clashes between protestors and riot police spilling out onto the nearby Neptune square.

At least 64 people were injured in the skirmishes, including 27 officers, Samur emergency medical services reported. Of those injured, 16 had to be rushed to local hospitals, according to the government delegate in Madrid.

By the end of the night, police had arrested 35 demonstrators on a variety of charges.

“They have my absolute support, and I want to congratulate the National Police because they showed professionalism during difficult times,” said the government delegate in Madrid, Cristina Cifuentes on Wednesday. Cifuentes had earlier warned that all protests in front of Congress were illegal and demonstrators would only be allowed to converge on Neptune square.

Cifuentes said the police came under a "disproportionate attack," with people at the protest hurling "stones, screws and bottles," at the law enforcement officers.

The protest began with a massive march, which had been called days earlier by the platform ¡En Pie! (stand-up) to protest budget cuts and demand that the Popular Party (PP) government of Prime Minister Mariano Rajoy resign. Some 1,300 officers, representing 30 of the National Police’s 52 units across Spain, were called to Madrid. Canine units and police on horseback were also on hand.

I want to congratulate the National Police because they showed professionalism"

“I came here so that lawmakers can see my face of suffering,” said Mamen Gubas, an unemployed resident of Bilbao.

According to the government delegate, 6,000 people took part in the March, which began peacefully until protestors reached the cordoned off gates of Congress. Demonstrators of all ages were among the crowds, from seniors and children, to thousands of young people convened via social networking sites.

Pushing and shoving began as dozens of people tried to get past the police barrier. They then began throwing beverage cans and other debris at officers.

Riot police began charging at demonstrators, beating them with nightsticks and detaining several. Meanwhile, lawmakers were meeting inside the Congress building.

“What are they hiding in there? This is our house. We have a right to enter,” yelled one female protestor.

Others tried to block the main entrance road by staging a sit-in protest but they were forcibly dragged away by the police, who called in eight riot vans, which were parked on the road.

Apart from some arguments between protestors and officers, the situation remained calm for several hours until a number of demonstrators tried to rush the three barricades that police had set up around the Congress building.

At 7pm, one man was arrested after he tried to plant a flag of the Andalusia Workers Union (SAT), of which Marinaleda Mayor Juan Manuel Sánchez Gordillo is a leader. It was at that point when a group tried to break down the barrier, located at a corner point of square, and the officers forcibly dislodged everyone who was standing near the blockade.

Pandemonium broke out throughout the Neptune square when police began trying to dislodge the rest of the protestors on the other side of the barricade.

One police chief was heard saying: “We are not going to retreat one centimeter but we are not going to advance either.”

For nearly two hours, protestors threw objects at the police while officers fired rubber bullets to keep the demonstrators at bay. One elderly man who was arrested during the trouble was heard begging the officers not to harm him.