Sydney: Australia and Iran will share intelligence to track foreign fighters working with Daesh in Iraq, Foreign Minister Julie Bishop said on Monday, as lawmakers urged caution.

In the first trip to Iran by an Australian minister in more than a decade, Bishop said it would be an informal arrangement.

Her comments came after a meeting with Iranian counterpart Mohammad Javad Zarif, President Hassan Rouhani and Ali Akbar Velayati, foreign affairs adviser to supreme leader Ayatollah Ali Khamenei.

“We have a common purpose with Iran in defeating Daesh and helping the Iraqi government,” she told the Australian Broadcasting Corporation.

“During my discussions with the national leadership here, it was agreed that we could share intelligence, particularly on the foreign terrorist fighters from Australia who are taking part in this conflict in Iraq.”

More than 100 Australians have travelled to Iraq and Syria to fight with the terrorists, raising concerns about the threat of “home-grown” extremists.

On Saturday, two men were arrested in Melbourne for allegedly planning an Daesh-inspired attack at Anzac Day commemorations on April 25 honouring soldiers who fought and died for Australia.

Bishop said Tehran had a strong military presence and long relationship with Iraq, coupled with a sophisticated intelligence network in places where Canberra had no presence.

“I believe that Iran has information that we would seek and they were very agreeable to share that information with us,” she said, without spelling out what Tehran would get in return.

“I won’t go into detail of our intelligence-sharing arrangements,” she said.

“But obviously if Iran has information that will be of interest to us, if we have information that would be of interest to them, in pursuing our common purpose of defeating Daesh, then that is an appropriate exchange.”

Independent MP Andrew Wilkie, a former intelligence analyst, warned Canberra it was “flirting with evil”.

“The regime in Iran can’t be trusted and Australia is flirting with evil by establishing any sort of security relationship with it,” he said, adding that Tehran had a track record of disseminating disinformation to further its own agenda.

The Labour opposition also urged caution.

“We need to keep our eyes open whenever we deal with them,” Labour leader Bill Shorten said.

Australia is part of an international coalition in Iraq and last week began deploying 330 more troops to train local soldiers fighting Daesh, joining an aerial and special forces contingent in the region.

Iran, though not part of the coalition, has run a parallel campaign using militias and military advisers to reverse the Daesh surge that came close to felling the Baghdad government last June.

Bishop said she made a point of explaining to Tehran that the deployment of more troops was strictly for military training purposes.

“I don’t want there to be any misunderstanding, any miscalculation or any misjudgement, and I made that point very clearly to each one of the leaders that I met,” she said.

“They must have an understanding of our role, because there’s a lot of misinformation that is flowing around Iraq and we know that Daesh is very good at propaganda.”