The residents said the Islamic State militants, who overran Mosul in June and imposed their harsh interpretation of Islamic law on the city, first ordered everyone out of the Mosque of the Prophet Younis, or Jonah, then blew it up.
The mosque was built on an archaeological site dating back to 8th century BC and is said to be the burial place of the prophet, who in stories from both the Bible and Quran is swallowed by a whale.
Several nearby houses were also damaged by the blast, said the residents, speaking on condition of anonymity because they feared for their own safety.
The residents told The Associated Press that the militants claimed the mosque had become a place for apostasy, not prayer. The extremists also blew up another mosque nearby on today, Imam Aoun Bin al-Hassan mosque, they said.
The attack came hours after Iraqi lawmakers elected veteran Kurdish politician Fouad Massoum as the nation's new president, as they struggle to form a new government amid the militant blitz that has engulfed much of northern and western Iraq.