A member of the Iraqi Interior Ministry’s anti-terrorism forces stands guard on a vehicle outside the Habaniyah military base, near Anbar province’s capital Ramadi, on Friday. (Ahmad Al-Rubaye/AFP/Getty Images)

At least 40 inmates, including prisoners with suspected links to the Islamic State, escaped a prison in eastern Iraq early Saturday after overpowering guards, Iraqi officials said.

Dozens of inmates and at least six guards were killed in the incident, which took place at the Khalis prison in Diyala province. In January, pro-government forces took control of the province from the Islamic State as part of a military offensive to win back the vast territory in Iraq that the extremist group seized last June.

In a sign of the chaos that continues to plague areas that have fallen under government control, officials gave conflicting reports of the number of people killed. Citing unnamed prison and police officials, the Reuters news agency reported that 50 inmates and 12 guards were killed.

But Saad Maan, an Interior Ministry spokesman, said by telephone that 30 prisoners and six guards were confirmed dead in the incident, which started when an inmate seized an unspecified weapon from a guard and went on a shooting spree.

“Forty people escaped, and nine are Daesh members,” he said, using the Arabic name for the Islamic State.

Hakim al-Zamili, head of parliament’s security committee, said 80 inmates with terrorism charges managed to escape. At least 30 inmates and six guards were killed, he said, describing the incident as a “major security lapse.”

Diyala, a province that is home to Sunnis and Shiites, is under the control of pro-government Shiite militias, which played a significant role in driving out Islamic State militants from the area. The presence of the militias has caused tensions to soar, especially among Sunni residents, who accuse the groups of carrying out sectarian-motivated attacks and killings.

Raad al-Dahlaki, a Sunni lawmaker from Diyala, accused the Shiite militias of playing a role in the prison break and called for a government investigation.

Last month, Kitaeb Hezbollah, a Shiite militia, announced in a statement that it broke into a police prison in northern Baghdad and freed five of the group’s members.

“The prison had several prominent members from the militias who appear to have escaped, and so it seems that these militias played a role in the escape,” Dahlaki said. “The prison is in the center of the city, and it’s completely surrounded and protected by the militias, so it’s not like this could have happened easily.”

Prison breaks occur regularly in Iraq. The most notorious one was at the Abu Ghraib prison in 2013, during which 500 inmates were freed in an attack by militants from the Islamic State of Iraq, the precursor to the Islamic State.

In Baghdad, meanwhile, a large car bomb exploded Saturday in the Karrada district, killing at least eight people and wounding about 30, according to Interior Ministry officials.

The capital has experienced a recent uptick in bombings that are suspected to be the work of the Islamic State.

Saturday’s attack appeared to target Shiite pilgrims who were commemorating Imam Musa al-Kadhim, a religious figure who lived during the 8th century. Expected to last until Friday, the observance involves thousands of Shiites who walk to Kadhim’s shrine, which is north of the capital.

Bracing for an increase of attacks on the pilgrims, authorities are stepping up security measures in the capital.

Read more:

Today's coverage from Post correspondents around the world