A burned-out car in eastern Baghdad, a day after a bomb attack Jan. 12 that killed at least 12 people while a double blast at a cafe north of the Iraqi capital claimed 20 more lives. (Ahmad Al-Rubaye/AFP/Getty Images)

A wave of attacks against civilians by the Islamic State and rival Shiite militias in a volatile Iraqi province has raised fears about the potential for deadly sectarian violence, even in areas where the extremist militants were officially declared eradicated.

The violence over the past week played out amid a rise in security-related incidents across the country, including a deadly attack on a mall in Baghdad and the abduction of three Americans by gunmen, also in the capital.

The sectarian clashes in northeastern Diyala province — which began with two deadly bombs at a local cafe but soon spiraled into retaliatory attacks on Sunni residents — prompted a public condemnation Friday from Iraq’s most influential Shiite cleric. That same day, a gunman on a motorcycle assassinated a prominent Sunni sheik in Diyala’s Muqdadiyah area, about 50 miles northeast of Baghdad.

Grand Ayatollah Ali Sistani, the top Shiite cleric, called on the government to rid Iraq of militants operating outside state authority, and he urged unity among Iraqi citizens. The Islamic State has waged a campaign of terror against Iraqi civilians for years, staging deadly car-bomb attacks on Shiite neighborhoods and markets across the country. But Iraq’s Shiite militias, too, have grown powerful and have also carried out widespread abuses, rights groups say.

Iraqi officials said Monday that it was likely that the Shiite militia Asaib Ahl al-Haq had abducted the three Americans in Baghdad, in a neighborhood where that group holds sway.

But sectarian violence has plagued Iraq since the U.S.-led invasion in 2003. Diyala, a patchwork of Iraq’s diverse ethnicities and sects that borders Iran, has long been a flash point for those tensions.

Last January, Iraq’s government declared Diyala free from the Islamic State, but the province fell under the influence of the Shiite militias spearheading the fight against the extremist group. The fresh attacks this month, in which scores have been killed, were a reminder of the divisions still driving violence in areas where the Islamic State has been ousted.

“Diyala is targeted because it represents the social fabric of Iraq and because it was the first province liberated from ISIS,” said the province’s deputy governor, Bassim Samarrai, using a common acronym for the Islamic State.

Iraq’s population is majority Shiite, but Sunni Arabs make up a large minority. Sunnis have accused the Shiite-led government of sectarian repression and abuses. Shiite leaders say Sunnis helped give rise to the Islamic State.

“Diyala is a microcosm of the country,” Samarrai said. “We must return life here back to normal.”

The recent violence in Diyala began the night of Jan. 11, when the Islamic State claimed twin bombings at a coffee shop in Muqdadiyah. The two bombs — an improvised explosive device, followed by a car-bomb attack on the crowd that had gathered — killed more than 40 people, local officials said.

Security forces then declared a curfew in the area. But in the hours after the attack, at least six Sunni mosques were burned or destroyed. Assailants set fire to Sunni shops in the market, and some residents said their Sunni neighbors were executed after militiamen dragged them from their homes. It was unclear how many civilians were killed.

Then, on Tuesday, the bullet-riddled bodies of two journalists for Iraq’s al-Sharqiya TV, a news channel seen as sympathetic to Iraq’s Sunnis, were found outside Muqdadiyah. Sharqiya executives said Shiite militias had killed the reporters at a checkpoint.

The militias with the strongest presence in Diyala are the Badr Organization and Asaib Ahl al-Haq, both backed by Iran. Local lawmakers suggested that Islamic State militants staged the attacks and executed civilians to implicate the militias and deepen divisions. But locals said that the militias have intimidated them for years and that they were caught between the violence on both sides.

“The militias took my cousin after the explosions [at the cafe], and now nobody knows where he is. We don’t dare leave our houses right now,” said Mohamed Ali, a 27-year-old taxi driver and Sunni resident of Muqdadiyah.

“The militias are in the streets,” he said. “The situation is very critical.”

Iraqi Prime Minister Haider al-Abadi traveled to Diyala on Thursday in a bid to calm tensions, but he did not visit Muqdadiyah. Some Iraqis pointed to his absence from the area, a rural area that is home to about 300,000 people, as a sign of the growing insecurity.

The militias’ recent rise in Diyala can be traced to the period following the Islamic State takeover of much of northern Iraq in 2014.

In the period after that offensive, the militias began harassing local Sunnis in Diyala, where the extremists also had carried out attacks. Some local Sunni men were executed, and many families were either displaced or prevented from returning home, Human Rights Watch said.

The New York-based rights group said the attacks in Muqdadiyah “appeared to be part of a militia campaign to displace residents from Sunni and mixed-sect areas” after the Islamic State had been routed.

“The attacks on mosques and houses in Muqdadiyah is a threat to Iraqi coexistence,” the Sunni speaker of parliament, Salim al-Jubouri, said in a statement. A Sunni lawmaker on Sunday said that Iraq’s major Sunni political parties would boycott parliament Tuesday and demand that the government punish those who carried out the attacks in the province.

“It’s wrong to think that armed groups operating outside the state will defend us,” Jubouri said, referring to the militias. “They are criminals and gangs, and they will turn their weapons against us.”

Mustafa Salim contributed to this report.