Updated

Dozens of students were being held hostage after gunmen stormed a university in the restive Anbar province west of Baghdad, 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.

Sky News reported that the militants infiltrated the site by killing guards before blowing up a bridge leading to the main gate. Security forces have cordoned off the campus.

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.

"The gunmen took some students to other university buildings. For the rest of us, we are still trapped in our rooms and everybody is in panic, especially the Shiite students," al-Mehamdi told The Associated Press in a phone interview from inside the dormitory.

The university attack is the third major operation by militants in as many days, Sky News reported. It follows an assault on the city of Samarra on Thursday where rebels seized several areas and were only repelled by helicopter strikes., and at least 36 people were killed in heavy fighting and suicide bombings in the northern province of Nineveh on Friday.

An Al Qaeda 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.

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.

Click here to read more from Sky News.

The Associated Press contributed to this report.