Updated

Uganda's parliament appears set to pass a law that critics said Monday would make it nearly impossible for activists and opposition members to hold public rallies of the kind authorities have long wanted banned.

Critics of the bill, which could pass this week following Uganda's ruling party endorsement of it last week, say the law would become a tool for Uganda's long-serving president to consolidate power at a time when his authority is increasingly challenged by opponents who say his time is up.

President Yoweri Museveni has been in power since 1986.

The bill would make the organizers of political rallies responsible for the safety of those who attend their events and it would require them to get the police chief's permission in writing before holding any public event.

That, some say, would effectively eliminate freedom of assembly in Uganda.

"The bill is very extreme," said Livingstone Sewanyana, who runs a Kampala-based government watchdog called Foundation for Human Rights Initiative. "Under normal circumstances we would not need this bill."

Museveni is one the world's longest-serving rulers. He won re-election last year but has since faced growing accusations of mismanaging the economy and condoning official corruption. His security apparatus has also become more aggressive in the face of opposition rallies for change.

Last month Uganda's attorney general, Peter Nyombi, issued a document banning Activists for Change, or A4C, the group that had since 2011 been organizing street marches against official corruption and the high cost of living.

The group responded by renaming itself 4GC, a play on Uganda's national motto, "For God and My Country." But Nyombi told The Associated Press that because 4GC is the same as A4C, it is also an "illegal organization."

Ugandan officials say opposition politicians are to blame for increasingly violent scuffles in which the police often use force to break up what they say are illegal assemblies within the central business district of the Ugandan capital, Kampala.

Political activists, citing constitutional guarantees on the freedom of assembly, say they do not need permission to hold rallies and that the police should be there only to protect them. Police say they are authorized to determine who can hold a rally and where.

The top opposition politician, Kizza Besigye, is often at the forefront of public marches.

The disagreement between the camps has sometimes ended in violent encounters between protesters and police armed with tear gas and live ammunition. Last March a policeman was killed by a rock thrown by a protester, leading to a warning by Museveni that those responsible would "pay dearly."

Critics say the public order bill would serve the government's needs by making it expensive and difficult for opposition politicians to hold public events deemed illegal by the police. They also worry that the authorities will use the bill to justify the use of excessive force in breaking up political rallies.

"It is a very draconian law and we are going to challenge it in court," Ladislaus Rwakafuuzi, a human rights lawyer based in Kampala, said of the proposed law. He said the bill is proof that the government had been pushed into a tight corner by growing calls for political change.

Human Rights Watch said late last month that Uganda had failed to investigate the violent killing of at least nine unarmed people in a wave of anti-government street protests in April 2011. The report said that Ugandan military and police "commit serious crimes with impunity, particularly during politically charged demonstrations."

Security forces in Uganda frequently disregard legal guarantees of free speech and assembly, it said.