His action mirrored that of Tunisian fruit seller Mohamed Bouazizi who set himself alight in late 2010 and helped ignite the Arab Spring
A door-to-door salesman set himself on fire on Thursday in a public prosecutor's office in southern Morocco to protest at the judiciary's inaction on a complaint he filed, local media reported.
Moroccan website Mashahid said the man "filed a complaint against a night watchman who had hit his car, but the court took no action, pushing him to take the action" in the city of Agadir, southwestern Morocco.
Suffering second degree burns, the unnamed man was taken to hospital under police escort, said another Moroccan news website, Lakome 2.
It said he was to be questioned to determine if he should face legal action.
Human rights activist Aziz Salami told AFP late on Thursday that the man was still being treated in an Agadir hospital.
His action mirrored that of young Tunisian fruit seller Mohamed Bouazizi who set himself alight in December 2010 and died a month later, sparking a revolution in his country and the 2011 Arab Spring.
In 2013, a door-to-door salesman in Marrakesh, in the centre of Morocco, a country where the World Bank says one in three young people are jobless, died after setting himself on fire to protest at the confiscation of his merchandise.