"In the early morning a group of 50 youths put up barricades and started burning containers to block access to the campus at the Complutense," Madrid's main university, a police spokesman told AFP.
One person was arrested for that, and more were detained later when a crowd of protesters occupied the vice-rector's offices and resisted as police moved to evict them.
"More than 50 people were detained," added another police spokeswoman, who asked not to be named.
Students' unions called a two-day strike from Wednesday in high schools and universities against the conservative government's crisis spending cuts and fee rises which they say are harming education.
The government launched public spending cuts in 2012 that aimed to save €150 billion ($206 billion) over three years to stabilize the public finances of the euro zone's fourth-biggest economy.
The national Students' Union said in a statement that more than a million young people had joined in the strike in thousands of institutions.
It called for demonstrations around the country on Thursday.