Prime Minister Malcolm Turnbull has travelled to Iraq and Afghanistan to meet Australian troops ahead of Anzac Day and to assess Australia's contribution to the wars raging in both countries.

Mr Turnbull met with Iraqi Prime Minister Haider al-Abadi in Baghdad, as well as Afghan President Ashraf Ghani and the United States Secretary of Defence, James Mattis, in Kabul.

The Prime Minister's visit to Iraq coincided with another surge of violence in Mosul, as Iraqi forces intensify their assault on Islamic State (IS) forces holed up in the city.

Australia has been providing training and mentoring to Iraqi forces battling for control of Mosul, as well as providing medical support.

Malcolm Turnbull has breakfast with troops during his Anzac Day visit. ( ABC News: Andrew Kennedy )

Last week Australian forces were caught up in a crude chemical attack by IS on Iraqi forces in the city, and provided first aid to those who were wounded.

Mr Turnbull and Mr Abadi discussed the campaign in Mosul and Iraq's prospects in the wake of the battle.

The ABC understands Mr Turnbull emphasised that Iraq had to "lock in" security gains as IS was forced back by cementing political stability in the country.

Sorry, this video has expired Malcolm Turnbull praises troops in Afghanistan

The Prime Minister also met Australian special forces in Baghdad and committed another $110 million in humanitarian aid for the war-torn nation.

Mr Turnbull said $10 million would be put towards "urgent needs arising from the operation to liberate Mosul".

The remaining $100 million will be spent on food, medical assistance and access to clean water, as well as government programs designed to protect women and girls in the city.

The Prime Minister met with Australian troops ahead of Anzac Day. ( Twitter: The PMO )

"At every level, you're helping the forces of Iraq defend themselves and liberate their country from Daesh [IS]," Mr Turnbull told Australian soldiers.

"We are fighting with the same allies we fought with 100 years ago, but in a different fight … and I want to thank you on the eve of Anzac Day for your service."

Sorry, this video has expired Malcolm Turnbull's Anzac Day message

He also travelled to Taji to meet Australian troops who are providing training to Iraqi army personnel and police.

In Afghanistan, Mr Turnbull held meetings with Mr Mattis who is currently visiting the country to reassess US strategy in the conflict.

The Prime Minister reiterated the Federal Government's commitment to the war effort against the Taliban in Afghanistan and said Australia would continue to work with other countries to build up the country's security institutions.

Mr Turnbull travelled to both countries to assess Australia's contribution to the wars raging in both countries. ( ABC News: Andrew Kennedy )

Afghanistan has been left reeling by a Taliban attack on an army base which left more than 140 soldiers dead, and the Afghan army is preparing for what is expected to be a year of hard fighting against Taliban militants, who now control or contest more than 40 per cent of the country.

Afghanistan's Defence Minister and Army Chief of Staff both stepped down in the aftermath of the attack.

Mr Turnbull met Mr Ghani and conveyed Australia's "sorrow and outrage" about the army base attack.

Mr Turnbull also spoke to Afghanistan Government chief executive officer Dr Abdullah Abdullah. ( ABC News: Andrew Kennedy )

ABC/Reuters