Thousands of demonstrators in Morocco have defied a government ban to march in a tense protest over planned cuts to Morocco's education system.

Marchers on Sunday chanted "We're prepared to go to prison!" and other slogans as they neared the parliament building in Rabat, Morocco's capital.

Teacher trainees have been protesting the cuts around the country for the past few months, and the response from security forces during some demonstrations has been violent. Riot police were scattered along the route of Sunday's march.

Wadi Al-Mrimar, one of the organizers, said police followed his bus en route to the protest.

Next month will mark the 5th anniversary of when Moroccans took to the streets as part of the "Arab Spring" protests.