"Only God, Muammar and Libya!" shouted the group, who were dispersed when onlookers threw rocks and opened fire on the demonstration. None of the demonstrators were reported to be injured.
Chanting "Muammar, Muammar," and waving pictures of the former leader and the green flags of his regime, the demonstrators demanded the release from prison of Saif al-Islam, Gaddafi's second oldest son who last week was sentenced to death by firing squad.
A court in Tripoli has conducted a mass trial of figures who served under Muammar Gaddafi, and convicted Saif al-Islam and other former officials of war crimes during the unrest in 2011 which led to the overthrow and murder of Muammar Gaddafi.
On July 28 Amnesty International stated that the trial of Saif al-Islam and 36 other officials loyal to Gaddafi was "marred with serious flaws," including being denied the right to legal counsel, to remain silent, to be promptly informed of the charges against them, to challenge evidence against them, and to be present at trial.
"Instead of helping to establish the truth and ensuring accountability for serious violations during the 2011 armed conflict, this trial exposes the weakness of a criminal justice system which is hanging on by a thread in a war-torn country with no central authority."
The protest on Tuesday is the first staged by Gaddafi loyalists since Libya's civil war began in 2011. Libya's internationally recognized government is based in the eastern city of Tobruk, while the Islamic Libya Dawn militia has control of the capital, Tripoli.