Pope Francis waves as he arrives to lead the Regina Coeli prayer in Saint Peter's Square at the Vatican, May 14, 2017. REUTERS/Stefano Rellandini

VATICAN CITY (Reuters) - Pope Francis called attention on Sunday to the plight of people affected by war and conflict in the Middle East as U.S.-backed forces close in on Islamic State militants in Iraq.

“So many innocent people are being sorely tested, be they Christian, or Muslim, or from minority groups like the Yazidi, who are suffering tragic violence and discrimination,” Francis said after his regular Sunday address in the Vatican.

“I encourage the different communities to follow the path of dialogue and friendship, to build a future of respect, security and peace, far from any sort of war.”

The battle for Mosul, the densely populated northern Iraqi city that Islamic State made its de facto capital, was approaching an end on Sunday after seven months of grueling combat.

Many Yazidis, whose beliefs combine elements of several Middle Eastern religions, were persecuted and held in Mosul by Islamic State, which considered them devil-worshippers.