Malaysian lawmakers approved a ban on street demonstrations Tuesday, right after hundreds of lawyers and activists took to the streets to commit that very act, protesting against the legislation, and chanting freedom to the people all the while.

The Peaceful Assembly Act must still be approved by the upper house, the Senate -- it was approved by the lower house of Malaysian Parliament -- but the passage is expected to be an easy one as the Senate is dominated by government members, The New York Times reported.

According to Prime Minister Najib Razak's ruling coalition, the act is intended to be proportionally harmonious in its striving for public order and the right to peaceful assembly. Malaysian and international rights groups, however, say the legislation is repressive as it bans street rallies and imposes tough restrictions and penalties for demonstrators; violators would face fines of up to 20,000 ringgit, or $6,000.

Proposed only last week,  the new law would restrict demonstrators to gathering primarily in stadiums and public halls and would be required to give authorities a 10-day notice of the event, who would determine whether the date and location are allowed.

The protestors accused Najib's National Front coalition of rushing to enact the law without proper public consultation.

We hope the government will listen to the voice of the people, said Bar Council President Lim Chee Wee.

Under existing laws, Malaysians must apply for a police permit for gatherings of more than five people. Moreover, gatherings within 50 meters, or roughly 160 feet, of prohibited places -- hospitals, schools or places of worship -- are not allowed. And no one under the age of 21 would be permitted to organize a protest.

The law infringes on the rights of the people and violates the constitution, said Wong Chin Huat of the group Bersih 2.0; the group headed a rally for electoral reform in July that was broken up by police.

If they don't change the law [Najib's government] will pay the price when voters abandon the government in the next general elections, he told AFP during the march.

International rights groups, including Amnesty International, also called for the bill to be withdrawn, saying it would further tighten the country's excessive restrictions on peaceful protests.

If the Malaysian government is serious about holding free and fair elections, it needs to end this assault on the right to peaceful protest, Sam Zarifi, Asia-Pacific director at Amnesty International, said in a statement.

Malaysian Bar Council President Lim Chee Wee said the ban on street demonstrations was outrageous.

Assemblies in motion provide the demonstrators with a wider audience and greater visibility, in order for others to see and hear the cause or grievance giving rise to the gathering, he said.

Opposition leader Anwar Ibrahim said the Peaceful Assembly Act would be more Draconian than laws in Zimbabwe or Myanmar.

We cannot accept the bill as it stands, he said.