Uganda’s president has ordered a reprieve for street vendors arrested in a recent “idleness” crackdown, saying the law was the result of a colonial “fear” of Africans.

Yoweri Museveni signed a directive to the attorney general and the chief of police for the immediate release of people jailed for being idle and disorderly.

He directed the director of public prosecution to discontinue all such cases pending in courts of law.

“Why should this be a crime? If I am unemployed and I hang about the park, why should somebody accuse me of the crime of hanging around? It is the colonialist that feared that Africans being around that drafted that law. It should be repealed,” he said.

Museveni also ordered the release of street vendors and hawkers serving jail sentences for selling clothes, food, trinkets, spices, fruits and household goods on the pavements in the capital, Kampala.

“All people that have been arrested on account of this nonsensical crime should be released immediately and all prosecution discontinued because, in any case, the police and courts have got more real crimes that they need to deal with (murder, rape, robbery, embezzlement, etc),” said Museveni in a tweet on Thursday.

All people that have been arrested on account of this nonsensical crime should be released immediately & all prosecution discontinued because, in any case, the Police and the Courts have got more real crimes that they need to deal with (murder, rape, robbery, embezzlement, etc) — Yoweri K Museveni (@KagutaMuseveni) October 3, 2019

Patricia, a street vendor on the capital’s Kampala Road welcomed the directive.

“We welcome the president’s gesture. This is a big relief for us. As vendors we can’t afford the rent fees for arcades. The police and enforcement officers have been torturing us,” said Patricia, a mother of three.

There are more than 10,000 vendors and hawkers in Kampala who have been engaged in running battles with the Kampala City Authority enforcement officers and police over illegal trade in the streets, with some of them arrested, charged and jailed. They face heavy fines and two-month prison sentences.

But Museveni’s actions have been challenged. Male Kiwanuka Mabirizi, a Kampala lawyer filed a case at the high court in Kampala this week, challenging the president’s directive as illegal, unreasonable, irrational and procedurally improper.

In his lawsuit, Mabirizi isarguing for the civil court to quash the directives and issue a permanent injunction and prohibition of any Ugandan government official or agency from implementing the orders.

“I am suing Museveni because he is taking Uganda back to [late dictator president] Idi Amin days, where he used decrees to expel Asians, kill citizens without trial, ban international media, etc,” Mabirizi told the Guardian.

“The inspector general of police is required to act according to the law. The offence of idle and disorderly is in the Penal Code Act, laws of Uganda,” he said.

“The director of public prosecution is independent and cannot take directives from the president.”

Frank Baine, Uganda’s prison spokesperson, said the directive will be respected and observed once received by the authorities.

“If the president has directed, the attorney general is going to write and the directive will be adhered [to] accordingly. We are waiting for the official communication and act,” said Baine.

“We have had [presidential] pardons, we have had other directives and we always respond to them,” he said.

However, Mabirizi said the president doesn’t have the powers to direct the release of inmates serving sentences without the advice of the advisory committee.

“The president can only exercise his prerogative of mercy upon being advised by the advisory committee on prerogative of mercy,” said Mabirizi.

“Uganda prisons admit and release prisoners upon court orders or a duly signed and sealed presidential pardon reached upon the advice of the committee on prerogative of mercy, and not on directives communicated through police,” he said.

“Museveni is not an appellate court to set aside convictions and sentences of courts. If he wants to help the convicts, let him pay for them the fines imposed by court. If Museveni wants the penal codes to be repealed, he should table a bill in parliament ,as he did with removing [presidential] term limits and age limits. Other than that, he has no powers to direct the police, director of public prosecutions or prisons,” said Mabirizi.