Morocco's King Mohammed VI has fired several ministers and top officials for failing to improve the economic situation in a region shaken by protests, a statement from the palace said.

King Mohammed VI dismissed the ministers of planning, housing, health and education, along with other senior officials on Tuesday, after the kingdom's accounting office found "imbalances" in implementing a development plan, state news agency MAP quoted the palace statement as saying.

The decision followed protests in the northern city of al-Hoceima, where residents have long complained of neglect and marginalisation.

The protests were part of a steadily growing popular movement known as Hirak al-Shaabi in the country's northern Rif region, which has come to symbolise resentment towards a history of state neglect and violence in the poor coastal area.

The firings came days before the anniversary of the death of a local vendor who was crushed in a garbage truck while trying to retrieve fish seized by police. His death prompted the protest movement.

The king's decree also came as protest leader Nasser Zefzafi and 29 others accused of organising demonstrations in the northern region went on trial in Casablanca. The session was adjourned until October 31.

They face charges ranging from conspiring against the state to protesting without authorisation.

In July, the king pardoned dozens of people arrested in the protests and blamed the failure of local officials to quickly implement development projects for stoking public anger.