UPDATE: 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.

BAGHDAD (AP) — Gunmen have stormed a university in the restive Anbar province west of Baghdad and are holding dozens of students hostage, Iraqi officials said Saturday.

Police and army officials say the attack took place Saturday morning when gunmen stormed Anbar University near the provincial capital Ramadi, parts of which have been held by Islamic extremists and other anti-government militants for months. The gunmen have detained dozens of students inside the university dormitory, they said.

Both officials spoke on condition of anonymity because they are not authorized to speak to the media.

An al-Qaida splinter group known as the Islamic State of Iraq and the Levant (ISIL) and other Sunni-led militants have controlled parts of Anbar province, including the city of Fallujah and parts of Ramadi, since late December.

FILE — In this Tuesday, Jan. 21, 2014 file photo, a gunman holds his weapon in Fallujah, 40 miles (65 kilometers) west of Baghdad, Iraq. Militants, many from the al-Qaida-breakaway group Islamic State in Iraq and the Levant, overran Fallujah and parts of Anbar’s capital, Ramadi, at the beginning of 2014, taking advantage of tensions between the Sunni community, which dominates Anbar, and the Shiite-led central government. Fighting has dislodged thousands of residents from their homes and forced shutdowns of their businesses. (AP Photo, File)

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 U.S. troops.

The latest violence has been fueled by Sunni Muslim anger at the Shiite-led government in Baghdad, as well as the civil war in neighboring Syria. ISIL has carried out scores of deadly attacks on both sides of the border and imposed a brutal form of Islamic rule in territories under its control. It was not immediately clear if ISIL was behind the university attack.