Around 500 Northampton university students were left without electricity overnight when a power cut affected the Boughton Green Road halls of residence.
The electricity cut off at 4.30pm on Wednesday due to a fault in the adjacent site to the halls on Park Campus, which is being redeveloped into housing.
Power was fully restored at 5am the following morning thanks to a generator that was set with the help of Western Power Distribution (WPD).
One student told the Chron the heating and water was also cut off and that some residents had to throw out food in fridges and freezers.
A spokesman for the university said: "The university bears no responsibility for the loss of power to the Boughton Green Road halls on Wednesday evening, which was caused by a fault in the electricity supply network.
"However our priority is the safety of the students. Staff and the police were in attendance immediately and throughout the night to provide emergency lighting, offer support and advice to residents on keeping themselves safe, and later to provide sandwiches and snacks for those who had not gone to bed.
"Once it became clear that the outage may last some time, the university arranged for a generator to be installed which arrived at 5am and restored full power to the halls.
"Therefore residents were only without electricity for a few hours overnight."
The generator will remain at the halls until the fault is fixed.
A WPD spokesman said: "We attended the site at Boughton Green Road but we established there was a problem with the internal equipment at the site rather than any of our equipment.
"We advised and helped the university get a generator to help the students get power back."