Thousands of demonstrators in Morocco are condemning prison sentences given to the leader of the Hirak Rif anti-poverty movement and dozens of other activists.

The demonstration brought one of the main avenues of the Moroccan capital, Rabat, to a standstill on Sunday. Security forces kept watch as participants sang, "The people want the detainees released" and "Long live Rif."

Hirak leader Nasser Zefzafi was sentenced to the maximum prison term of 20 years for threatening state security. An appeals court upheld his sentence and those of other activists this month.

Rif is the struggling region in northern Morocco where the Hirak movement was born in 2016. The movement demands development and job creation for the region.

Families, human rights organizations and left-wing parties are demanding the imprisoned activists' immediate release.