Security forces have reportedly retaken control of Anbar University near Ramadi in western Iraq, where hundreds of staff and students had been held hostage by gunmen.
Militants fought their way past guards to break into the campus overnight and are said to have told those inside that they would be taught a lesson they would never forget.
But reports say the gunmen fled after security forces launched an assault, with a number of casualties.
Police sources have blamed the attack on militants from the Islamic State in Iraq and the Levant group.
Ramadi was overrun at the start of the year by insurgents although government forces later regained control of the city centre.
Separately, for the second day running, dozens of people are reported dead in clashes between security forces and insurgents in the northern city of Mosul.