The two black V.I.P. vehicles, their hoods adorned with Bangladesh’s national flag according to state protocol, idled late one recent evening in a ground-floor parking lot at the University of Dhaka.

The cars were waiting for two students, both 26. Just a week before, they were hounded leaders of a youth-driven popular uprising against the country’s seemingly unbreakable prime minister. Now, after her astonishing ouster, the two are cabinet ministers in the country’s interim government.

Inside the parking lot, young women and men milled around these unlikeliest of government officials, asking questions and posing for selfies. On a pillar at the entrance, spray-painted graffiti declared the moment: “Revolution is not a dinner party.”

Outside, the streets of this country of 170 million people are run by students.

After overcoming a deadly crackdown and toppling Bangladesh’s iron-fisted leader, Sheikh Hasina, the student protesters are now seeking to set a new course for a nation born in bloody rupture five decades ago and marked by political violence ever since.

The magnitude of their task is not lost on anyone. Not on the young leaders and mobilizers themselves, who have been surprised by what they have achieved and are scrambling to protect the spaces that have fallen into their hands.

Ms. Hasina’s power had grown so all-consuming that her departure triggered a near-total collapse of the state. A wave of violence, including revenge killings and arson, persisted after her departure, with the country’s long-persecuted Hindu minority, in particular, gripped with fear. Almost all of the country’s police officers went into hiding, afraid of reprisals for the force’s role in the deaths of hundreds of young protesters.