Malcolm Turnbull has called for “genuine reconciliation” to secure lasting peace in Iraq and has personally thanked Australian defence force personnel for their efforts during his first visit to the country since becoming prime minister.

Turnbull underlined the importance of winning the “war of ideas” and easing sectarian tensions during a meeting with Iraq’s prime minister, Haider al-Abadi, in Baghdad on Saturday.

He travelled to Camp Taji, near the capital Baghdad, to meet the ADF personnel who are working alongside New Zealanders to train local security forces in the fight against Islamic State (Isis). The prime minister also visited the Australian base in the United Arab Emirates where he was briefed by the chief of the ADF, Air Chief Marshal Mark Binskin.

Turnbull stopped over in Iraq on the way to his first official visit to the United States, where his talks with Barack Obama are set to be dominated by coalition efforts against Isis and other security issues.

While Australia has formally declined a US request to increase its military commitment beyond its current level, Turnbull used his meetings in Iraq to emphasise the significant size of the existing involvement. He said the contribution to coalition forces on the ground in Iraq remained second only to that of the US.

The prime minister told al-Abadi Australia was “strongly committed to helping Iraq in its fight against Daesh”, another term for Isis.

“Daesh is a threat to all of us and we need to continue to work together to defeat these terrorists,” he said in remarks to the media after their meeting.

“But this war against Daesh requires, for victory, more than military means. It is also in many respects a war of ideas. I have discussed with you, prime minister, your efforts to promote national unity and reconciliation, and that is absolutely critical to countering this extremism now and for the longer term.

“You fill us with confidence that victory against Daesh in Iraq is within sight, within reach. You exude confidence, prime minister, and that is very encouraging, but the victory must be one that endures. For it to endure there must be genuine reconciliation between the various parties in Iraq.”

Turnbull added there needed to be “a solution, an outcome, a reconciliation in Syria” in order to maintain peace in Iraq. He invited al-Abadi to visit Australia.

About 780 ADF personnel are in the Middle East for the anti-Isis operation, including 400 in the air task group that is carrying out airstrikes in Iraq and Syria, 300 in the Taji group working with New Zealand on a training mission, and 80 in the special operations task group “advising and assisting” Iraqi security forces.

Turnbull, answering questions from ADF personnel at the Taji military complex, said the Iraqi government had not asked for an extra military commitment from Australian, but “the nature of our commitment may evolve over time”.

The prime minister also defended his handling of the US request, which he said comprised “a form letter to 40 countries which basically was in exactly the same terms”. Turnbull said the Australian government judged its existing commitment to be substantial given the ADF’s size and the country’s distance from the theatre.

Turnbull urged other countries, particularly European countries, to “step up and make a greater contribution to it”.

On his visit to Taji, Turnbull said the ADF personnel were winning plaudits for their “great professionalism, great commitment and great success”.

He told the troops al-Abadi had “spent a long time, much of the meeting, talking about the great work you’re doing, how much he appreciated it, and the absolutely critical role in that success in retaking Ramadi – which of course has been so important not just at a tactical level but it’s been an enormous strategic lift for the Iraqi government”.

“It’s given them an enormous boost to their morale, and they certainly feel that they couldn’t have done it without you, so hats off, you have done a great job, it’s terrific,” Turnbull said.

In remarks at Camp Baird in the UAE, Turnbull said the ADF was “doing vitally important work, not just for Iraq, not just for the region, but for the whole world”.

“We have a global struggle against terrorism and you are in the front line,” he said.

Turnbull’s approach to the fight against terrorism has raised the ire of some members of his Liberal party allied to the former prime minister Tony Abbott, including the former defence minister Kevin Andrews who said Australia should have favourably considered the US request to contribute more to the military efforts.

Andrews, who has previously argued ground forces would be needed to defeat Isis, repeated his views in a radio interview on Sunday but said he did not think Turnbull’s rejection of the request would affect Australia’s relationship with the US.

“We have a long-term relationship with Washington and can I say these are matters of judgment,” Andrews told 3AW.

“I’m not saying this in any black-and-white, absolute sense. It’s a matter of judgment but my opinion is that where a reasonable requests comes from the US if we’re capable of meeting it then we should give serious consideration to doing so because we’ve basically got to win this war.”

Andrews said he had not spoken to the prime minister since airing his opinions and said the disagreement was “not a personality issue for me”.