Members of the students' wings of the radical Jamaat-e- Islami and the secular-leaning Awami National Party (ANP) opened fire during the clash in Peshawar University, the varsity's spokesman said.
"Luckily no one was killed and one student sustained minor injuries," he said.
A number of rooms in the hostel were set on fire during the clash.
The university's administration was forced to call in police to control the situation. Members of the Islami Jamiat Talaba (IJT), the Jamaat's students' wing, pelted stones at the policemen.
The university constituted a committee to probe the incident and submit a report to the administration.