BAGHDAD (AP) — Militants who stormed a university in Iraq’s restive Anbar province and took students hostages have withdrawn.

The attack took place early Saturday morning at Anbar University near the provincial capital, Ramadi.

After seizing dozens of students, police and military officials say the gunmen later withdrew. They say the students boarded buses to leave and gunfire erupted between the gunmen and security forces.

The officials spoke on condition of anonymity as they weren’t authorized to speak to journalists.

Iraq is currently grappling with its worst surge in violence since the sectarian bloodletting of 2006 and 2007, when the country was pushed to the brink of civil war despite the presence of tens of thousands of US troops. Parts of Ramadi have been held by militants and gunmen for months.

Copyright 2014 The Associated Press.