A statement issued by Ban's spokesperson on Sunday night stated that reports of mass executions by ISIL were deeply disturbing and underscored the urgency of bringing the perpetrators of such crimes to justice, Xinhua reported.
"The secretary general warns against sectarian rhetoric that could further exacerbate the conflict and carry grave implications for the entire region," the statement said.
Calling on all Iraqi leaders - political, military, religious and community - to ensure that their followers avoid acts of reprisal, Ban urged them to "coalesce behind an inclusive national security plan as well as political and social measures aimed at addressing, on the basis of the constitution, the substantial threat to the country."
"The secretary general once again urges the international community to unite in showing solidarity with Iraq as it confronts this serious security challenge," it said.
"He calls for full respect for international humanitarian law and human rights law in efforts to counter terrorism and violence in Iraq."
The UN Assistance Mission for Iraq (UNAMI) stands ready to assist the government and people of Iraq in overcoming the crisis, Ban added in the statement.
The security deterioration in Iraq started last week when bloody clashes broke out between the Iraqi security forces and hundreds of gunmen who took control of several neighbourhoods in western part of Mosul and expanded later to other areas and provinces after the Iraqi security forces withdrew from the city.