MADRID (AP) -- Tens of thousands of Spaniards and Portuguese rallied in the streets of their countries' capitals Saturday to protest enduring deep economic pain from austerity measure, and the demonstration in Madrid turned violent after Spaniards enraged over a long-lasting recession and sky-high unemployment clashed with riot police for the third time in less than a week near Parliament.
The latest violence came after thousands of Spaniards who had marched close to the Parliament building in downtown Madrid protested peacefully for hours. Police with batons later moved in just before midnight to clear out those who remained late because no permission had been obtained from authorities to hold the demonstration.
Some protesters responded by throwing bottles and rocks. An Associated Press photographer saw police severely beat one protester who was taken away in an ambulance.
Spain's state TV said early Sunday that two people were hurt and 12 detained near the barricades erected in downtown Madrid to shield the Parliament building. Television images showed police charging protesters and hitting them with their batons, but the violence did not appear as severe as a protest on Tuesday when 38 people were arrested and 64 injured.
Earlier, the boisterous crowds let off ear-splitting whistles and yelled "Fire them, fire them!" — referring to the conservative government of Prime Minister Mariano Rajoy, and venting their anger against tax hikes, government spending cuts and the highest unemployment rate among the 17 nations that use the euro currency.
On Friday, Rajoy's administration presented a 2013 draft budget that will cut overall spending by €40 billion ($51.7 billion), freezing the salaries of public workers, cutting spending for unemployment benefits and even reducing spending for Spain's royal family next year by 4 percent.
Pablo Rodriguez, a 24-year-old student doing a master's in agricultural development in Denmark, said the austerity measures and bad economy mean most of his friends in Spain are unemployed or doing work they didn't train for.
He plans to work abroad after graduating and doubts he will put his education to use in Spain until he is at least 35 or 40, if ever.
"I would love to work here, but there is nothing for me here," Rodriguez said. "By the time the economy improves it will be too late. I will be settled somewhere else with a family. One of the disasters in Spain is they spent so much to educate me and so many others and they will lose us."
Madrid authorities put the number of protesters at 4,500 — though demonstrators said the crowd was larger. In neighboring Portugal, tens of thousands took to the streets of Lisbon Saturday afternoon to peacefully protest against even deeper austerity cutbacks than Spain has imposed.
Retired banker Antonio Trinidade said the budget cuts Portugal is locked into in return for the nation's €78 billion ($101 billion) bailout are making the country's economy the worst he has seen in his lifetime. His pension has been cut, and he said countless young Portuguese are increasingly heading abroad because they can't make a living at home.
"The government and the troika controlling what we do because of the bailout just want to cut more and more and rob from us," Trinidade said, referring to the troika of creditors —the European Commission, the European Central Bank and the International Monetary Fund. "The young don't have any future, and the country is on the edge of an abyss. I'm getting toward the end of my life, but these people in their 20s or 30s don't have jobs, or a future."
In Spain, Rajoy has an absolute majority and has pushed through waves of austerity measures over the last nine months — trying to prevent Spain from being forced into the same kind of bailouts taken by Portugal, Ireland and Greece. But the country has an unemployment rate of nearly 25 percent, and the jobless rate is more than 50 percent for those under age 25.
Investors worried about Spain's economic viability have forced up the interest rate they are willing to pay to buy Spanish bonds. The country's banks hurting from a property boom that went bust are set to get help soon from a €100 billion ($129 billion) financial lifeline from the eurozone, and Rajoy is pondering whether to ask for help from the ECB to buy Spanish bonds.
Finance Minister Cristobal Montoro said Saturday that the budget cuts for next year were necessary to ease market tensions and try to bring down high interest rates Spain must pay to get investors to buy its bonds.
Associated Press photographer Andres Kudacki in Madrid and television producer Yesica Fisch in Lisbon, Portugal, contributed to this report.