Outside the Indonesian parliament, police fired tear gas and rubber bullets tonight against thousands of protesters hurling rocks and molotov cocktails. Inside the chamber, the embattled B.J. Habibie fought to keep alive his hopes of retaining the presidency by mounting a marathon defense of his stormy 16-month term.

Several students and at least one policeman were reported injured in the clashes, which erupted just before Habibie's appearance before the 700 members of the People's Consultative Assembly who soon will decide his political future. The assembly is to vote Friday on Habibie's speech, which defended his stewardship of the country. A rejection would almost certainly doom his already dwindling chances of being re-appointed by the assembly next week to a full, five-year term.

On the streets, thousands of students and other reform advocates, who have no voice in the formal election, were already making their opinions known. They staged several large demonstrations around the capital, demanding that Habibie resign, that his predecessor and mentor Suharto be tried for corruption and that the military end its dominant role in Indonesia's political life.

At one point, the newly elected assembly chairman, Amien Rais, came out and addressed the students from atop a minibus, urging them to halt their protest. When he agreed to take four student leaders inside the chamber to hear Habibie's address, the protests died down.

In the speech, which lasted more than 2 1/2 hours, Habibie took credit for turning around Indonesia's economy, which had been devastated by the Asian financial crisis of 1997-98. He cited a drop in inflation from 75 percent last year to zero today, an expected return to positive growth following a 13 percent plunge in 1998 and a currency, the rupiah, that stabilized at midyear at around 6,500 to the dollar compared with a low of 15,000 to the dollar last year.

"Our economy has entered a period of recovery," Habibie declared.

Habibie also took credit for ushering in a new era of democracy after 32 years of authoritarian rule. "The government, among other things, freed political prisoners and abolished restrictions on the media," Habibie said. He said solving Indonesia's problems was the "gigantic task" he faced when he took office, and he said he realized those problems "cannot be fixed in only 521 days," his time in office so far.

Habibie also defended some of the most controversial and divisive policies of his brief tenure, including the referendum on East Timorese independence and his decision to drop a corruption investigation into the ailing Suharto's alleged ill-gotten wealth.

Habibie said the government had little choice but to make the independence offer, since Indonesia's international image was suffering because of the long-running dispute over East Timor's status. He also urged assembly members to ratify the Aug. 30 vote and allow East Timor to cecede.

"We, as a big nation, must accept and respect the result of the ballot," Habibie said.

Habibie's handling of the question of Suharto's wealth has been one of the protesters' main complaints. On Monday, Habibie's acting attorney general halted the investigation into Suharto's alleged corruption, citing insufficient evidence, and today the former dictator's youngest son was acquitted in a court case.

A three-judge panel acquitted Hutomo "Tommy" Mandala Putra, 37, of two corruption charges involving a land deal between his company, Goro Batara Sakti, and the state food agency Bulog.

After the speech, reaction was mixed. Popular opposition leader Megawati Sukarnoputri, considered Habibie's main challenger for the presidency, said, "It's a personal opinion and it depends on the factions [in the assembly]. But I can see that the president's speech should be rejected."

Megawati's party controls about a third of the seats in the assembly.

But another opposition leader, Abdurrahman Wahid, who leads Indonesia's largest Muslim organization and is himself a presidential contender, said the speech contained "the spirit of corruption elimination and the spirit of law enactment. . . . I can accept the speech."