Islamic State is talking to Al-Qaeda about a potential alliance to form a combined terror group as Iraqi troops close in on jihadis in Mosul.

Messengers representing ISIS' leader Abu Bakr al Baghdadi and his al-Qaeda counterpart Ayman al Zawahiri have discussed what is understood to be a potential merger deal.

This month it was reported the two terror groups had already formed a partnership in Libya amid mounting pressure on the jihadi movements and a leaked memo suggested they could be working together as one organisation by 2021.

Demonstrators chant pro-Islamic State group slogans as they wave the group's flags in front of the provincial government headquarters in Mosul

Messengers representing ISIS' leader Abu Bakr al Baghdadi (left) and his al-Qaeda counterpart Ayman al Zawahiri (right) have discussed what is understood to be a potential merger deal

Osama bin Laden (left) sitting with his deputy and eventual successor Ayman al-Zawahiri at his hide out at an undisclosed location in Afghanistan

Iraqi Vice President Ayad Allawi revealed the new information in an interview on Monday, citing regional contacts in the country.

'The discussion has started now,' Allawi said.

'There are discussions and dialogue between messengers representing Baghdadi and representing Zawahiri.'

Islamic State split from al-Qaeda in 2014 and the two groups have since waged an bitter battle for recruits, funding and the mantle of global jihad.

Zawahiri has publicly criticized Islamic State for its brutal methods, which have included beheadings, drownings and burning prisoners to death.

It is unclear how exactly the two groups may work together, Allawi said, but mergers have popped up elsewhere in the Middle East and Africa.

Libyan branches of the two terror groups held talks this month about sharing a governing council, according to documents leaked to newspaper Al Sharq al Awsat.

The memos also revealed ISIS and Al-Qaeda believed they would be united fully by 2021.

A general view shows a damaged street as Iraqi counter-terrorism service (CTS) forces advance towards the Sekak neighbourhood in western Mosul on April 11, 2017, during the ongoing offensive to retake the city from Islamic State jihadis

An Iraqi federal policeman fires a machine gun at an Islamic State position on a nearby rooftop during the battle to recapture west Mosul on April 12, 2017 in Mosul, Iraq. Despite being completely surrounded, Islamic State fighters are continuing to put up stiff resistance to Iraqi forces who are now having to engage ISIS in house to house fighting through the narrow streets as they continue their battle to retake Iraq's second largest city of Mosul

Islamic State blazed across large swathes of northern Iraq in 2014, leaving the Iraqi central government reeling.

Baghdadi declared a caliphate over the territory the group controlled from the al-Nuri mosque in Mosul the same year, which also became a point of contention with al-Qaeda.

File photo of ISIS leader Abu Bakr al Baghdadi

Last October, Iraqi security forces and Shi'ite volunteer fighters, commonly referred to as the Popular Mobilization Units teamed up with an international coalition, including the United States, to drive Islamic State from of Mosul and the areas surrounding the city.

The group has been pushed out of the half of Mosul that lies east of the Tigris River, but Iraqi soldiers and their allies are now bogged down in tough fighting in the narrow streets of the Old City of Mosul, west of the river, according to Iraqi security officials.

Islamic State has used suicide bombers, snipers and armed drones to defend the territory under their control.

The group has also repeatedly targeted civilians or used them as human shields during the fighting, according to Iraqi and American security officials.

The militant group has lost ground in Mosul but still controls the towns of Qaim, Hawija and Tal Afar in Iraq as well as Raqqa, their de facto capital in Syria.

Even if Islamic State loses its territory in Iraq, Allawi said, it will not simply go away.

'I can't see ISIS disappearing into thin air,' he said.

'They will remain covertly in sleeping cells, spreading their venom all over the world.'