Baghdad - Iraqi security forces backed by Shia militias, Kurdish forces and Sunni Muslim tribesmen will drive the Islamic State of Iraq and the Levant (ISIL) from all Iraqi lands before the end of 2015, Iraqi security officials and analysts say.

Iraq has been witnessing its worst security crisis since the 2003 US-led invasion to topple Saddam Hussein. In June, ISIL fighters overran Iraq's second largest city of Mosul without any real resistance from Iraqi troops. A few days later, ISIL seized the neighbouring province of Salahaddin and swaths of Kirkuk and Anbar provinces.

Thousands of civilians and troops have been killed since then in direct clashes or mass executions carried out by ISIL. About two million people have been displaced from the conflict zones.

The dramatic collapse of Iraqi troops in the northern and western provinces and the rapid advance of ISIL fighters towards the capital prompted Aytollah Ali al-Sistani, the most revered Shia cleric in the country, to call on Iraqis to volunteer to back up the Iraqi security forces in their battle against ISIL.

RELATED: Iraqi Kurds retake more ground from ISIL

Iraqi security officials and analysts said the local and regional circumstances of the battle between Iraqi troops and ISIL fighters have changed in favour of Iraqi troops since June. Among the key players battling ISIL are Iran, the US-led international military coalition, anti-ISIL tribesmen and a regional intelligence coalition.

Iran, which has strong ties with the Shia-led government in Baghdad, was the first country in the region to respond to the Iraqi government's calls for help - primarily ammunition and weapons, as the Iraqis lost thousands of weapons and equipment after withdrawing in Mosul, Salahaddin and Anbar.

Iran is unifying the armed Shia factions and bringing all of them together to fight side by side, and this has intensified the power of the Iraqi troops in the front lines and greatly helped them to gain multiple victories over the last few months. Abdulwahid Tuama, independent political analyst

"Iran already has been playing a vital role in battling ISIL in Iraq as it has been delivering the required weapons, ammunition and intelligence information for both Baghdad and Erbil," Abdulwahid Tuama, an independent political analyst, told Al Jazeera. "Iran is unifying the armed Shia factions and bringing all of them together to fight side by side, and this has intensified the power of the Iraqi troops in the front lines and greatly helped them to gain multiple victories over the last few months."

Iraqi troops backed by Shia militias and Kurdish forces, following the direction of Iranian military advisers, recaptured the towns of Saadiyah and Jalawlaa over the last few months. These had been under the control of the extremist group since early August.

Some weeks earlier, ISIL fighters were driven out of Jurf al-Sakhar, a strategic town that was a key supplier for ISIL groups in southern Baghdad.

Both battles were commanded by the Iranian General Qasim Sulaimani, the head of al-Quds unit, and Hadi al-Amiri, the leader of the Shia Badr Organisation. They mainly relied on the Shia militias, according to several Kurdish officers and Shia militia leaders.

In early August, ISIL fighters turned back to attack the western areas of Iraq's semi-autonomous Kurdish region, populated by Christian and Yezidi minorities. A week later, the United States authorised air strikes targeting ISIL fighters in Iraq. This was later expanded to become an international military coalition led by the US to deliver required assistance for Iraqi troops and Kurdish forces, including air strikes, consulting, training, equipping and arming.

"At the beginning, ISIL was attacking and the rest of the Iraqi troops and its local backers were defending, but now, we are attacking, regaining control over towns and villages. The initiative of the battle is in our hands and they [ISIL fighters] are defending and losing," Yazin al-Joubori, a senior anti-ISIL leader who heads the tribal fighters battling alongside Iraqi troops in Salahaddin, told Al Jazeera. "The air cover that has been provided by the US-led International military coalition changed the formula. ISIL is losing and its fighters cannot grip the ground anymore."

RELATED: Kurdish fighters move on ISIL's Mosul hub

Iraqi Sunni Muslims have felt marginalised and excluded since 2003, after the electoral victory of Shia Muslims. They said they were unfairly targeted by the former Shia premier, Nouri al-Maliki, who was accused of misusing anti-terrorism laws against them. This sense of injustice, according to Sunni lawmakers, was one of the main factors driving Sunnis to embrace ISIL.

Haider al-Abadi, who took the helm in September, has pledged to review all decisions taken by his predecessor with respect to Sunni Arabs and to bring down the unjust ones. He will grant more power to the local governments, including the Sunni provinces, to ensure the management of their affairs are tended to away from the central government.

"Our major problem was the incubators of ISIL, which were most of the Sunni tribes in the Sunni areas, but now the situation has changed since the new premier took control over this file," a senior military officer, who is familiar with the talks between the government and Sunni tribal leaders looking to fight ISIL in Anbar, told Al Jazeera.

"If we are talking about the situation in Anbar, many big Sunni tribes that were watching the situation have turned against ISIL since the group started carrying out mass executions that targeted their sons, and now they are asking to get weapons to fight alongside our troops [in Anbar]," the officer said.

Abadi has promised to adopt an open foreign affairs policy towards the regional countries that boycotted Iraq for years because of the policies of the previous Iraqi administration.

Abadi has visited Iran, Jordan, Kuwait and the UAE over the last few months, and was planning to visit Turkey in the coming days. His foreign affairs minister, Ibrahim al-Jaafari, has visited Saudi Arabia, Turkey, Bahrain and several other Arabic countries, seeking the required support to fight ISIL.

"Iraq last month signed a security agreement with the Arabic Gulf countries, Lebanon, Jordan, Iran, Turkey, England and the US, to form an intelligence circle to exchange all kinds of information related to ISIL, its leaders, its funders and its fighters who moved to Iraq from these countries," a senior intelligence officer who serves in the counter-terrorism squad told Al Jazeera.

"This circle should have taken place a long time ago, but for many reasons it did not. Its aim is to follow the movements of ISIL leaders and their recruiting lines. It's an intelligence cooperation set up to dismantle this organisation."

The officer said that the Iraq-Saudi rapprochement, the Egypt-Qatar rapprochement and the initial rapprochement between Iran and Saudi Arabia will all be developed and ultimately go in favour of the Iraqi government in its war against ISIL.

"Dismantling ISIL will be the biggest achievement of 2015," the officer said. "[ISIL] will be defeated in Iraq but will not disappear from the region."