BAGHDAD — Iraq’s capital lurched closer to a renewed cycle of sectarian slaughter on Tuesday after the bodies of a Sunni cleric and his aides, allegedly kidnapped by Shiite militiamen, were found in a Baghdad morgue and dozens of inmates were killed in a prison as insurgents battled security forces about 35 miles north.

The Muslim Scholars Association said Imam Nihad al-Jibouri and two of his aides were executed after being abducted by men dressed as security forces, killings reminiscent of the tit-for-tat violence of the worst days of Iraq’s 2005-2007 civil war. The Sunni group warned of retaliation.

Baghdad has remained relatively calm amid a rampage in the north by al-Qaida-inspired militants from the Islamic State of Iraq and Syria (ISIS). But with thousands of Shiite volunteers answering a call to arms from religious leaders and the Shiite-led government, many Sunnis in the capital and elsewhere fear reprisal attacks.

“There is a real risk of further sectarian violence on a massive scale,” U.N. Secretary General Ban Ki-moon warned Tuesday, as he urged Iraqi political and religious leaders to avoid incitement.

The United States is also pressuring Prime Minister Nouri al-Maliki, widely accused of failing to prevent the crisis, to bridge the sectarian divide. It has made clear that U.S. military support is contingent on the Maliki government undertaking political reforms.

Meanwhile, sectarian violence is on the rise. Jibouri and his assistants had been abducted in the religiously mixed neighborhood of Saidiyah four days before their bodies turned up in the morgue Monday, the Muslim Scholars Association said.

The group, a Sunni religious organization that the U.S. military long suspected of involvement in the insurgency against American troops, said in a statement that “these crimes won’t go unpunished.”

It added: “The day will come when we punish all the criminals and those who stand behind them.”

Saidiyah was a flash point for sectarian killings during the civil war, when Sunni and Shiite death squads roamed the streets, filling morgues to bursting point.

Reports of mass killings also have been emerging from the confused battlefields across the country as government forces attempt to recover from their humiliating rout a week ago, Shiite militias join the fray and ISIS militants continue to try to seize territory.

On Monday, the United Nations accused ISIS of “systematic” executions in and around the north-central city of Tikrit.

As insurgents continued to bear down on Baghdad from a number of northern locations on Tuesday, the country’s biggest oil refinery – in Baiji – was shut down and Turkey evacuated its consulate in the southern oil hub of Basra.

In Baqubah, capital of the religiously mixed Diyala province, 52 prisoners were killed as government troops battled to hold off an ISIS assault, Maj. Gen. Qassim Atta, a spokesman for Iraq’s military, told the National Iraqi News Agency.

Other reports put the death toll at 44. There were conflicting reports on how the men died, with some saying the security forces killed the inmates. Twitter accounts affiliated with ISIS said the men were executed at the hands of the police.

In Baghdad, a spokesman for the security forces, Saad Maan, said at a news conference that security forces had “pre-emptively” killed 65 unspecified “terrorists,” but he gave no details.

According to Atta’s account, the men were killed by ISIS extremists as they attempted to storm the prison. Nine ISIS members also were killed in the attack, he said.

Hamid al-Mutlaq, a member of a bloc of secular parties led by Ayad Allawi, said that the killings occurred after ISIS attempted a prison break but that the security forces had executed the prisoners after repelling the attack.

“This is not the first incident, and it will not be the last,” said Mutlaq, who added that he had been in touch with security forces in the area. “It’s not worse than usual yet, but it is getting worse as a result of sectarian sentiments and the influence of Iran.”

With Iraq’s Shiite neighbor rallying to support Maliki and the United States sending up to 275 troops to protect its embassy in Baghdad, the longtime adversaries have found themselves with mutual interests.

As the United States weighs its options for action, it has also taken the unusual step of having its diplomats engage with their counterparts from Iran, to discuss possible cooperation to help stop ISIS’ march. The White House has ruled out military cooperation with Tehran, however.

As Washington and Tehran are drawn in, a U.N. human rights panel warned that the Middle East is on the “cusp of a regional war,” with militants from Syria fueling the insurgency in Iraq. In a report Tuesday, the Independent International Commission of Inquiry on Syria said regional war was moving “ever closer.”

Washington Post staff writer Abigail Hauslohner in Irbil, Iraq, and Post correspondent Daniela Deane in London contributed to this report.