By Geoffrey Miller, for the Democracy Project
Analysis - This week marks the 20th anniversary of the Iraq War.
While it strongly opposed the US-led invasion, New Zealand's then Labour-led government led by Prime Minister Helen Clark did deploy military engineers to try to help rebuild Iraq in mid-2003.
With violence soaring, their 12-month deployment ended without being renewed further, in 2004.
However, New Zealand re-entered Iraq in 2015 as part of the international coalition against the Islamic State of Iraq and Syria (ISIS) terrorist group.
The emergence and growth of ISIS was one of many unintended consequences of the Iraq War's disastrous and bloody aftermath.
The government announced last year that the remaining two New Zealand personnel deployed as part of the coalition will be withdrawn by the end of June.
New Zealand first opened an embassy in Baghdad in 1975 - one of its first missions in the Middle East - only to close it again in 1983.
An embassy was re-established in Iraq in 2015 to support military operations, but the post was again closed in 2020 as the anti-ISIS mission wound down.
The time might be right for New Zealand to take another look at Iraq.
The past 20 years have been a long, bloody road - but there is now a little optimism in the air.
Monthly civilian deaths caused by conflict in Iraq are now at their lowest levels since the US invaded in 2003, according to the Iraq Body Count group.
And the surprise pledge by Iran and Saudi Arabia to restore diplomatic ties has the potential to reshape the region.
Behind the unexpected deal was an unexpected mediator - China - but much of the groundwork had also been laid by Iraq in talks that began in 2021. The Gulf state of Oman has also played a pivotal role.
In theory, Iraq - which has significant Sunni, Shia and Kurdish populations and sits geographically between Saudi Arabia and Iran - is perhaps a natural location for attempts to de-escalate regional tensions.
Baghdad hosted a major new summit initiative co-organised with French President Emmanuel Macron in 2021, which inspired a follow-up event in Jordan in December that was dubbed 'Baghdad II'.
The Iranian and Saudi foreign ministers spoke to each other on the sidelines of the conference in Amman, the Jordanian capital.
Iran has arguably been the big winner of ongoing turmoil and unrest in Iraq since 2003.
Many political parties have the backing of Tehran, as do militia groups that operate under the Popular Mobilisation Forces (PMF) banner.
Last year, the PMF managed to quell protests outside Baghdad's powerful Green Zone area from supporters of Shi'ite cleric Muqtada al-Sadr, whose party had won the biggest share of the vote in 2021 elections.
Sadr has now withdrawn from the political process. The outcome has been the formation of a government by the Coordination Framework bloc of anti-Sadr Shiite parties, led by new Prime Minister Mohammed Shia' Al Sudani.
It remains to be seen whether a government that excludes the most popular party led by Sadr can gain legitimacy in the eyes of Iraqis, or whether it can solve long-standing problems including rampant corruption, general economic malaise, poverty and high unemployment.
About a quarter of Iraq's population of 43 million live below the poverty line, while more than a third of young people aged under 24 are unemployed.
It is also unclear whether the Saudi-Iranian resumption of diplomatic ties will grow into something more - and whether Iran will dial down its role in Iraqi domestic politics.
But China's involvement in the deal suggests that Iran and Saudi Arabia may have realised there is more to be gained from working together than fighting old battles.
In addition to being a major player in Iraq, Iran has also been a key actor in long-running civil wars in Syria and Yemen.
The war in Syria has killed more than 300,000 civilians and created more than five million refugees - with many others displaced internally. The conflict in Yemen - called the world's worst humanitarian crisis by the UN's World Food Programme, has led directly or indirectly to some 400,000 deaths.
In both conflicts, Iran and Saudi Arabia have backed opposing sides - and supplied ample weaponry.
However, the civil wars may finally be coming to an end.
Reports have suggested that Tehran agreed to stop sending arms to Houthi rebels in Yemen as part of the deal with Saudi Arabia, while there are signs that Riyadh is facing up to the fact that President Bashar al-Assad has defeated Saudi-backed rebels in Syria.
Peace would be good news for the Middle East.
However, a deal involving China, Iran and Saudi Arabia - matched with Assad's likely victory in Syria - shows the shifts will probably come without democracy.
The commitment by Tehran and Riyadh to at least contemplate burying the hatchet - with Beijing's assistance - shows that a more economic focus could be on the horizon.
For New Zealand, which has maintained embassies in Beijing, Tehran and Riyadh for decades, any rapprochement could boost long-term trade prospects in the Middle East.
Iran - now home to 80 million people - was once the second-biggest buyer of New Zealand lamb.
For its part, Iraq holds the fifth-largest proven oil reserves in the world.
Newly-built skyscrapers in the Kurdish-controlled northern city of Erbil show that this wealth is already being felt by some - if not by all.
Syria - which also suffered enormously from last month's Turkish earthquake - and Yemen will need much greater reconstruction efforts. However, the rebuild could happen faster than expected, especially if Chinese investment is forthcoming.
Iraq, Syria and Yemen are also likely to benefit from their relative proximity to the wealthy Gulf Cooperation Council (GCC) countries of the Arabian Peninsula, which already constitute New Zealand's seventh-biggest export market.
However, not everything is straightforward with the Saudi-Iran deal.
For one, Iran is supplying dozens of killer Shahed drones to Russia for use in its unrelenting war on Ukraine.
And Amnesty International last week said Iran's security forces have used "horrific" tactics - including torture and rape - to crush recent human rights protests sparked by the death of Mahsa Amini in September.
Nanaia Mahuta, New Zealand's foreign minister, recently condemned Iran's "violent repression of protest activity" in a speech to the UN Human Rights Council - and imposed travel bans and other restrictions on members of the country's leadership.
New Zealand may be wary of getting involved too deeply in the Middle East.
Change is clearly underway - but the region is likely to remain a diplomatic minefield.
But if Beijing is interested, Wellington probably should be too.
New Zealand may want to think about re-opening its embassy in Baghdad - again.
* Geoffrey Miller is the Democracy Project's geopolitical analyst and writes on current New Zealand foreign policy and related geopolitical issues. He has lived in Germany and the Middle East and is a learner of Arabic and Russian. He is currently working on a PhD on New Zealand's relations with the Gulf states.