The parliament of Uganda has taken a first step towards scrapping the presidential age limit, which would allow long-time leader Yoweri Museveni to stay in power, in a heated session that saw politicians brawling for a second consecutive day.

The move on Wednesday met widespread opposition from civil rights activists, opposition politicians and religious leaders.

Under the existing constitution, a person standing for president must be under 75 years of age - which would make Museveni, 73, ineligible to stand in the next polls in 2021.

Tempers frayed in parliament for the second day over the plan, backed by members of Museveni's National Resistance Movement (NRM) party.

MPs brandished microphone stands, threw punches and clambered over benches as security officers sought to remove 25 legislators barred by Speaker Rebecca Kadaga after engaging in another brawl on the same issue on Tuesday.

Despite the disruption, the bill was passed after the leader of the parliamentary opposition, Winnie Kiiza of the Forum for Democratic Change (FDC), led a walk-out.

"We are not going to be part of Museveni's life presidency project," Kiiza said.

But supporters of the motion argued that age limits discriminate against the elderly.

"Age should not be a factor that hinders the rights and freedom of any Ugandan to vie for the post of a president," Moses Balyeku, a member of parliament, said.

Before Tuesday's parliamentary sitting got under way, police fired tear gas to disperse protests by students and opposition activists in the capital Kampala.

"Some students and other young people were causing commotion and attempting to rob shopkeepers. We engaged them with tear gas," Emirian Kayima, police spokesman, said.

READ MORE: Uganda's Museveni re-elected amid controversy

Nineteen people, including Uganda's leading opposition figure, Kizza Besigye, were also arrested. Kayima said Besigye was taken into custody after he attempted to mobilise protesters to march on parliament.

Local media reported protests against the legislative measure also broke out in other parts of Uganda.

Museveni took control of Uganda in 1986 at the head of a rebel army. In 2005, he had the constitution amended to remove term limits, enabling him to stand successfully for a third, fourth and fifth consecutive term.