Thousands of Islamists were in an hours-long standoff in Morocco's capital with hundreds of riot police when they were prevented from burying the widow of their spiritual leader.

The Islamist Al Adl wal Ihsan (Justice and Charity) movement — the most powerful opposition movement in the country — staged a sit-in outside the seaside cemetery Thursday after police prevented the burial of Khadija al-Maliki.

It was a rare standoff for the movement, which typically keeps a low profile despite having wide support in the country.

It has long criticized the monarchy and called for political reform and a state based on Islamic precepts.

The funeral for its founder, Abdessalam Yassine, at the same cemetery attracted hundreds of thousands.

After several hours, police allowed supporters into the vast cemetery.