Prime Minister Malcolm Turnbull received a Maori welcome ceremony from the New Zealand troops when he arrived to meet with Australian troops in Camp Taji, Iraq on Sunday 23 April 2017. Pool Photo: Andrew Meares Photo: Andrew Meares

Prime Minister Malcolm Turnbull has made an unannounced Anzac Day-eve visit to Iraq and Afghanistan to meet serving Australian troops, and leaders of both countries.

In a strictly controlled visit - the details of which were kept secret to protect the safety of Mr Turnbull and his travelling party - the Prime Minister visited Iraq on Sunday, and Afghanistan on Monday.

His office announced the visit on social media early on Tuesday, posting a photo on Twitter of Mr Turnbull surrounded by Australian forces in Afghanistan.

In Iraq, Mr Turnbull met with troops at Camp Taji, a military operation used by Australian and New Zealand troops. There, he received a a Maori welcome ceremony from New Zealand troops stationed at the base.

Despite being a secure facility, the base has been marred by deadly violence. In June last year four Iraqi soldiers were killed, and 12 others injured, when a suicide bomber blew himself up at the northern gate of the military base. Earlier that month a car bomb exploded on the southern end of the base, killing seven Iraqi men.

Australian forces involved in the Building Partner Capacity Mission at Taji have now trained more than 20,000 Iraqi Security Forces personnel and 3000 federal police.

In Baghdad, Mr Turnbull thanked Special Forces troops for their service, and handed out 15 service medals. For more than two years, the Australian Special Operations Task Group has been advising and assisting the Iraqi Counter-Terrorism Service in the fight against the so-called Islamic State, providing leadership training, tactical movement training, removing improvised explosive devices, and conducting counter-terrorism training.

Mr Turnbull also met with Iraqi Prime Minister Dr Haider Al-Abadi, and congratulated him on the strong military gains against ISIS, which has now lost more 60 per cent of territory it once held in Iraq.

Australia, Mr Turnbull said, would provide a further $110 million in humanitarian and stabilisation assistance for Iraq.

In the last year alone, Australia's aid programme in Afghanistan has helped enrol more than 5000 children in school, trained more than 9000 farmers and funded multiple women's shelters.

There are more than 1700 Australian Defence Force personnel deployed in the Middle East, with about 750 contributing to Operation Okra in Iraq and Syria, and 270 contributing to Operation Highroad in Afghanistan.

Since 2002, 42 Australian troops have been killed in Afghanistan and two in Iraq.

On Monday, Mr Turnbull, accompanied by Australian Chief of Defence Force Air Marshall Mark Binskin, had a lightning visit to Afghanistan.

There, he visited troops serving at Camp Qargha near Kabul, and met with Afghan President Dr Mohammed Ashraf Ghani, US Secretary of Defence General James Mattis and Commander General of the International Security Assistance Force, John "Mick" Nicholson.

Overnight, Mr Turnbull's office released an Anzac Day message on Mr Turnbull's Facebook page, in which he paid tribute to the service of Australian servicemen and women, and those they left behind.

"We pay tribute to those who faced the horrors of war, and we reflect onthe heavy burden of war still felt by many Australians," he said.

"More than 100,000 men and women have died in the service of our nation. Many more have been left wounded in body and spirit. Their sacrifice has protected our liberty and our values. And their legacy continues in the work of those who serve today."