A small group of Australian special forces soldiers will help guard the Australian embassy and its staff in Baghdad.

While the government isn't saying just how many, it's understood to be under 10.

Neither is it saying just what unit they come from, although the Special Air Service Regiment and 2nd Commando Regiment both have close protection expertise.

Described as a "liaison element", the troops will assist personnel from Australian security company Unity Resources Group, who have guarded the embassy since the withdrawal of the last Australian military security detachment in August 2011.

The situation in Iraq has deteriorated significantly since jihadists from the Islamic State of Iraq and the Levant (ISIL) routed government forces from two major cities a week ago.

Australia began withdrawing its officials from the strife-torn country this week, leaving an essential core of embassy staff in place.

Up to 100 Australians are believed to be fighting with jihadists in Iraq and Syria, including with ISIL.

In his strongest warning yet, Prime Minister Tony Abbott vowed that "murderous potential terrorists" trying to return to Australia would be locked up to protect the community.

"These people should have no place in our country, and we will do our best to keep them out," he told reporters in Sydney on Friday.

"If they can't be kept out, they will be taken into detention because we are not going to allow people who are an obvious threat to our safety and security to roam loose in Australia."

Australia can't have "trained killers who hate our way of life, who hate us, making mischief with the potential to cause mayhem in our country", he said.

Australia has not received calls for assistance from the United States or other parties, but Mr Abbott said if any such request was made it would be taken seriously.

The federal government has warned there is little they can do to assist those Australians in Iraq, estimated at possibly more than 2000.

Labor strongly opposed Australian military involvement in Iraq but opposition defence spokesman Stephen Conroy backed the decision to send troops to Baghdad to provide additional security to Australian embassy officials.

"Given the unstable security situation in Iraq, this is an appropriate course of action to take," he said.