The Iraqi government has approved a deal with Australia, which will see 200 members of Australian special forces train Iraqi troops to fight against Islamic State.
Legal protection for the troops demanded by Australia caused a row between the countries and delayed the signing of the agreement, with the troops waiting in the UAE for over a month.
"We have reached an agreement for a legal framework and now it will be a matter for our military when our special forces will be deployed," Foreign Minister Julie Bishop said at the end of her trip to Baghdad.
Australia is a major contributor to the US-led coalition in the fight against IS and has committed a total of 600 soldiers.