The marchers, who were flanked by police, on Sunday headed from the mosque of Sultan Said bin Taymur in the centre of the Omani capital to a roundabout where they dispersed peacefully.
"Our sheikhs are innocent," said some of the banners raised by the marchers, while others pledged loyalty to Oman's ruler Sultan Qaboos bin Said Al Said.
The march, which began at about 7pm (1500 GMT), lasted nearly an hour. Some pleaded for a light sentence, reported Aljazeera.
Street protests are banned in Oman as in other Gulf Arab states.
The march came as the state security court prepared to deliver its verdict on Monday in the case of the 31 Islamists, who are accused of membership of a banned organisation, and plotting to overthrow the government.
Lawyers have said their clients, who were arrested in January, are innocent and that they merely sought to promote the teachings of the sultanate's majority Ibadi sect.
Some marchers pledged loyalty
to Sultan Qaboos
The defendants have pleaded not guilty to the charge of plotting to overthrow the government by force, although some of them expressed "regret" and asked Sultan Qaboos to pardon them.
The prosecution says the secret organisation to which the accused belonged was first formed in 1982.
It has a public arm which organises pilgrimages and youth summer camps, and an underground wing that strives for the establishment of an imamate in Oman in accordance with the teachings of their faith, according to the charge sheet.
An offshoot of a dissident Shia sect, the Ibadis are named after their founder, Abd Allah bin Ibadh al-Maqissi, originally from Ibadh in Saudi Arabia. The faith was introduced to Oman in the eighth century.
Unconfirmed reports at the time of the arrests said the group was suspected of planning attacks on the Muscat festival, a month-long trade and cultural event spanning part of January and February, as well as commercial centres and oil installations.