The teachers are gone. The administrators as well. Students have seized control here and at hundreds of other schools across Brazil in a widespread rebellion against government budget cuts.

The takeovers began in early October and have spread to at least 19 states, a wave of youth resistance to the austerity policies of new President Michel Temer, who faces the gargantuan task of pulling Latin America's largest economy out of deep recession while reining in the deficit.

At the Colegio Pedro II - Humaita II high school in Rio de Janeiro, about 50 students sleep on the campus each night, and 100 more join them each day for self-organized yoga and dance classes, lectures and plays.

On a recent day, a guest lecturer taught them about gravitational pull. Other students milled about in the hallways or gathered in the cafeteria to peel potatoes for lunch.

The students have even set up their own library, a table jammed with Portuguese translations of the Harry Potter books and Gabriel Garcia Marquez's "One Hundred Years of Solitude."

The targets of their protest are Temer's efforts to reform the education system and impose a federal spending cap to slash the country's chronic budget deficits, which they fear will mean sharp cuts in school spending.

"Public education is already so bad," said Julia Couto, 16, who wants to study literature in college. "How can the government reduce spending on it?"

Temer insists that's not his intent, saying any cuts would be made elsewhere. He has criticized the students, saying their tactics amount to "throwing an old tire in the road to stop traffic."

The education bill would make optional subjects that had previously been required, like arts and physical education. It would also lengthen the school day, which students say won't address the quality of what happens in the classroom.

The growing involvement of a sector of the population that rarely engages in politics is presenting a "a very big test for the Temer government," said Monica de Bolle, a senior fellow at the Peterson Institute for International Economics.

The Brazilian Union of Secondary School Students says that about 1,000 schools have participated in the occupations.

One face of the movement is that of Ana Julia Pires Ribeiro, a 16-year-old who addressed her state legislature in Parana last month and accused legislators of abdicating their responsibility to young people.

Video images of lawmakers shouting her down and the president of the assembly threatening to cut off her microphone have mushroomed across social media in Brazil.

In an interview with The Associated Press, Ribeiro said that whether students succeed in getting the legislation scrapped is secondary. Instead, she said a level of consciousness had been developed that will be important for future fights with lawmakers.

"If you don't push, you will never get anything," said Ribeiro. "Our schools are very overcrowded, they are in bad shape. They simply don't meet the challenges and realities of our country."

The Senate is expected to approve the spending cap on Nov. 29 and send it to the lower chamber of Congress. Students are promising protests in the capital that day.

Leandro Beguoci, the editor-in-chief of the education magazine Nova Escola, said the students already have accomplished much. "For the first time in my life, I see education as a central part of the Brazilian national debate," he said.

That appears to be part of a wider engagement with politics in Brazil, according to de Bolle, who is also a professor at Johns Hopkins' School of Advanced International Studies.

The removal from office of President Dilma Rousseff and a spiraling government corruption scandal have combined to "make the level of scrutiny of anything that this government does much greater than would have been the case, say, five years ago even," she said.

The education and spending bills were expected to be easy wins for Temer, who was vice president and took over for Rousseff. The backlash means he's likely to struggle to pass the more difficult elements of his agenda, such as social security reforms that are likely to meet stiff opposition from unions.

Students have made clear they will be watching.

"You learn more about politics in a week of occupying a school than in years of regular classes," said Degvison Sousa, a 19-year-old participating in an occupation in another Rio de Janeiro school. "Now young people know they can force change."


Sarah DiLorenzo reported from Sao Paulo.