Shortly before midnight, some 2,000 armed soldiers and marines arrived in trucks and tanks and burst into the Indonesian parliament building.
After a stand-off lasting more than three hours, the students finally agreed to leave in a convoy of buses taking them to the nearby Atmajaya University. Chanting and singing, they clambered in and on top of the buses.
At the height of the occupation, tens of thousands of students had packed into the parliamentary complex, but in the early hours of this morning only a couple of thousand remained.
The week-long occupation ended without a drop of blood being spilled. Indonesia's new president, BJ Habibie, has therefore scored an important victory within two days of assuming office, but it is not clear whether this will end the protests.
When the students occupied it last Tuesday, Indonesia was ruled by the longest surviving dictator in Asia. Two days ago, thanks largely to their campaign, he resigned. But as the events of yesterday showed, the ideals for which they stood are still a long way from being established in Indonesia.
In his inaugural speech, the new president, Bacharuddin Jusuf Habibie, praised the students as a "wave which is carrying us into the 21st century". But he - or his military commanders - showed little respect last night when the forces were sent in.
The first hint that the week-long protest carnival was over came earlier in the day in a seemingly mild comment by the commander of the armed forces, General Wiranto, that the time had come for the students to end their protests.
But in the afternoon there was a more sinister incident when hundreds of Muslim youths appeared and engaged in an uneasy standoff with the students, before departing to pray.
By 2am today, the remaining 1,500 students were confined to two pockets, one in front of the parliament's main gate, one alongside the fountain, in which they had been jubilantly splashing after the announcement of Suharto's resignation two days earlier.
The atmosphere was tense but despite earlier reports of students being beaten, there was no sign of imminent violence. Around the parliament buildings from which the students had been driven, it was still and quiet. Most of the banners, bearing slogans denouncing both Suharto and President Habibie had been torn down.
Student leaders wept as they stood on the front of an army truck and announced through a megaphone the end of their remarkable campaign: after negotiations with military officers they had agreed to leave peacefully.
"Friends, friends!" said one distraught man. "As the oldest among you, I ask you to disperse peacefully, students of Indonesia."
"We will not give in, we will not run away." said Andi, one of the students. "The military is going against the wishes of the people. We cannot allow this."
The factional struggle within the armed forces appeared to have been resolved yesterday after Lieutenant-General Prabowo Subianto, Suharto's son-in-law and rival to General Wiranto, was sacked as head of the army's Strategic Command.Reuse content