US President Barack Obama has called on Middle Eastern leaders to stand up to "violent extremism" and stop proxy wars that fuel the rise of terror groups.

"The notion that the West is at war with Islam is an ugly lie," he told the final day of a conference on combating extremism.

"And all of us, regardless of our faith, have a responsibility to reject it."

Mr Obama challenged Middle Eastern powers to stop actions that he claimed have stoked the rise of Islamic State, Al-Qaeda and others.

Fighting between Sunnis and Shia "will only end when major powers address their differences through dialogue and not through proxy wars," he said.

In Iraq and elsewhere, countries like Saudi Arabia and Iran have been accused of backing rival factions in a bid to exert influence.

Turning to Islamic State, Mr Obama said the governments of Syria and Iraq should bear some responsibility for the group's emergence.

"In Iraq, the failure of the previous government to govern in an inclusive manner helped to pave the way for ISIL's (Islamic State's) gains there."

In Syria, Bashar al-Assad's "war against his own people and deliberate stoking of sectarian tensions help to fuel the rise of ISIL," he said.

Mr Obama was addressing a conference that has been months in the making, but took on greater significance after several extremist attacks that have hit countries from Nigeria to Demark to Pakistan.