JAKARTA, Indonesia (AP) _ Thousands of university students rampaged in several cities today, clashing with police in protests against a new law giving the military sweeping emergency powers.

Police fired rubber bullets and beat students with clubs in two marches in the capital, Jakarta, bloodying dozens of protesters. Four were rushed to the hospital with bullet wounds.

At least five police officers were burned when they were hit by firebombs in the capital.

Four thousand protesters flooded into the streets in the country's second-largest city, Surabaya, and more than 200 rallied on the resort island of Bali.

The protests erupted just hours after national lawmakers passed the bill, which allows the military to ban protests, take over the telecommunications system and mail service, and curb freedom of expression if a state of emergency is proclaimed.

Even before the new law, the military held a dominant role in governing this country of 210 million people.

Students, who led the movement that toppled President Suharto last year, claim the new measure threatens Indonesia's fledgling democratic rule and gives the military too much power.

In the first protest today, 500 students rallied at Jakarta's Moestopo University in the southern part of the city. About 100 riot police clashed with the students, firing rubber bullets and swinging batons.

In the second protest, another group of about 1,500 students and their supporters tried to march on parliament. When blocked by police, they started throwing rocks.

Police responded by firing tear gas and then rifles with rubber bullets.

On the resort island of Bali, about 230 young people rushed to the local military headquarters in a noisy protest, though no injuries were reported.

The 4,000 protesters in Surabaya broke through three large gates and stormed into the regional parliament, where they clashed with security officers.

Gen. Wiranto, head of the Indonesian armed forces, defended the law, which had sparked protests in Jakarta and elsewhere for days before its passage.

``The bill will be enacted not to serve the interests of the military but to safeguard the unity of the nation,'' he said.