A day after Uganda's president ordered the closure of one of Africa's oldest universities, 23-year old Gabriel Deng was hurriedly stuffing his belongings into rucksacks in a rundown student hostel.

Pop music blared down the corridor from a nearby room as other students at Makarere -- Uganda's top university and one of the oldest and best in Africa -- scurried about on Wednesday as riot police stood on guard outside.

"Now that President Museveni has ordered the university closed, we have to leave but I don't have anywhere to go," said Deng, a first-year veterinary student.

On Tuesday, Uganda's long-time ruler President Yoweri Museveni ordered the indefinite closure of Makarere after days of student protests culminated in violent clashes with police.

"Yesterday the police came and fired teargas into the hostel," Deng said.

"We can't stay here but I'm a refugee from South Sudan so if I can't find a friend to stay with in Kampala, I might have to return the refugee camp."

Unlike in South Africa where students protesting over the high cost of fees have brought universities to a standstill and chaos to their campuses, the Ugandan protests are in response to a fortnight of strike action by academic staff demanding better pay and conditions.

As a result there has been no teaching, angering students eager to learn.

Dr Muhammad Kiggundu, chairman of the staff association, said lecturers had not been paid a university-agreed "incentive payment" after years without a pay rise.

"The incentives are a top-up which give us enough to live on but it hasn't been paid for nine months. Members of our association feel that we are being taken for a ride," he said.

'Really bad situation'

Museveni's intervention on Tuesday evening brought an end to negotiations between university administrators and staff, but on Wednesday police were taking no chances as they ordered students to vacate the campus.

Outside Mary Stuart Halls, students forced their belongings into over-filled suitcases. Thin mattresses, rolled-up, were propped against walls and laundry baskets overflowed with pillows and dog-eared textbooks.

Dozens of police officers in riot gear kept a close watch as students filed out of the main gate past water cannon trucks and armoured personnel carriers.

Those who remained would be treated as a security threat, warned police spokesman Andrew Kaweesi.

Julliet, a 21-year old student who was afraid to give her last name, sat nearby with her friends waiting for her parents to transfer money to her phone so she could buy a bus ticket home.

"I'm from Gulu in the north of Uganda but it costs 25,000 Shillings ($7) for the bus and I don't have that," she said.

Julliet, who is studying to become a teacher, said she was "worried about our lecturers" and about her education after "teargas covered the whole campus" during Tuesday's unrest.

"I'll just stay at home until the university opens," she said.

"There's nothing we can do. The situation is really bad."