BAGHDAD — Militants stormed a university in Iraq’s restive Anbar province Saturday, briefly taking dozens of students hostage before withdrawing from the school amid gunfire, officials and witnesses said.
The attack on Anbar University comes as Islamic extremists and other anti-government militias have held parts of the nearby provincial capital of Ramadi and the city of Fallujah since December amid rising tensions between Sunni Muslims and the Shiite-led government in Baghdad. While shelling and gunbattles continue between the militants and government-allied forces, the school largely has been left alone while civilians fled the violence.
That changed early Saturday morning as the gunmen killed three police officers on guard at the university’s gate, a police and a military official said. The gunmen then detained dozens of students inside a university dorm, the officials said.
Ahmed al-Mehamdi, a student who was taken hostage, said he awoke to the crackle of gunfire, looked out the window and saw armed men dressed in black racing across the campus. Minutes later, the gunmen entered the dormitory and ordered everybody to stay in their rooms while taking others away, he said.
The Shiite students at the school were terrified, al-Mehamdi said, as the gunmen identified themselves as belonging to an al-Qaida splinter group known as the Islamic State of Iraq and the Levant. The Sunni terror group, fighting in Syria with other rebels trying to topple President Bashar Assad, is known for massive, bloody attacks in Iraq as well often targeting Shiites that they view as heretics.
The Islamic State did not immediately claim the attack on the school, which says it has more than 10,000 students, making it one of the country’s largest.
Several hours later, gunmen left the university under unclear circumstances. Students then boarded buses provided by the local government to flee the school, though gunfire erupted as security forces attacked retreating militants, police said.
‘‘We thank God that this crisis ended almost peacefully and no student was hurt as far as I know,’’ al-Mehamdi said by mobile phone from inside a bus that took him to safety.
Security officials said authorities wanted to wait for bomb disposal experts before entering any building on campus out of fears that the fleeing gunmen planted explosives.
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. The Islamic State 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.
Those attacks include a coordinated assault April 21 on a private Shiite college in Baghdad that killed four police officers and one teacher.
Al-Qaida-linked fighters and their allies seized Fallujah and parts of Ramadi in late December after authorities dismantled a protest camp of Sunnis angry at what they consider their second-class treatment by the Shiite-led government. Fearful of setting off violence, security forces withdrew from the area, allowing militants to seize the cities. In April 2013, a similar dismantling of a Sunni protest camp in Hawija sparked violent clashes and set off the current upsurge in killing.
The government and its tribal allies are besieging the rebel-held areas, with fighting reported daily. Tens of thousands have fled the violence.