Baghdad on Saturday declared victory in its war to expel the jihadists
Saudi Arabia on Sunday hailed Iraq's defeat of the ISIL group, calling it a "grand victory on terrorism" amid warming ties between the Arab neighbours.
Baghdad on Saturday declared victory in its war to expel the jihadists, three years after the group proclaimed a cross-border "caliphate" stretching into Syria, endangering Iraq's very existence.
"The end of the war in Iraq... (is) a grand victory on terrorism in the region," the official Saudi Press Agency said, citing a foreign ministry official.
The official voiced hope that "security, stability, prosperity, and progress will prevail in Iraq and for the Iraqi people".
Backed by a US-led coalition, Iraqi forces gradually retook control of all territory lost to the jihadists over the last three years.
Ties between Sunni-ruled Saudi Arabia and Shiite-majority Iraq have begun looking up in recent months, after years of tense relations.
After former dictator Saddam Hussein's August 1990 invasion of Kuwait, Riyadh severed relations with Baghdad and closed its border posts with its northern neighbour.
But a flurry of visits between the two countries this year appears to indicate a thawing of ties.
Iraq is seeking economic benefits from closer ties with Riyadh as both countries suffer from a protracted oil slump. Saudi Arabia is also seeking to counter the influence of regional rival Iran in Iraq.