He made the remarks in a fast-breaking (Iftar) meal ceremony held at the Iranian embassy in Baghdad.
Hakim called Iran-Iraq relations historical, adding that the Iraqi groups should prepare for countering challenges they will face after defeat of ISIS.
In the ceremony, Iraqi Foreign Minister Ibrahim al-Jaafari, for his part, hailed the achievements made in the fight against terrorism.
Iraq is committed to good neighborly relations with Iran, he added.
Meanwhile, Iranian Ambassador to Iraq Iraj Masjedi said that cooperation between Tehran and Baghdad can guarantee security, sovereignty and progress of Iran and Iraq.
He voiced hope for the victory of Iraqi armed forces and volunteer forces over ISIS.