Indonesia has sealed the fate of hundreds of its citizens and former nationals drawn to fight for the Islamic State group, in a Presidential decision blocking a return to their homeland.

Key points: President Joko Widodo rules against return for almost 700 Indonesians in Middle East

President Joko Widodo rules against return for almost 700 Indonesians in Middle East Government considers possible return for children aged under 10

Government considers possible return for children aged under 10 ISIS propaganda paraded young Indonesian boys as armed child jihadis

Immediately after his two-day state visit to Canberra, Joko Widodo settled on a decision that had vexed his Government for months.

Most of the estimated 689 men, women and children who joined the fight for the Islamic caliphate in Syria and Iraq will be left stranded in the Middle East because of the ban.

At the end of a cabinet discussion at the Presidential Palace in Bogor, Indonesia's Coordinating Minister for Security Affairs, Mohammad Mahfud MD, said the safety of 267 million citizens had to be protected from what he called the ideological "terrorist virus" of the foreign fighters.

"The Government has no plan to return, or will never return, the foreign terrorist fighters back to Indonesia," Mr Mahfud said.

Cabinet's deliberations had been based on advice from the anti-terrorism agency BNPT and police.

Indonesian Chief Security Minister Mohammad Mahfud MD likened returning ISIS fighters as a "terrorist virus". ( Reuters: Ajeng Dinar Ulfiana )

By its own admission, the Government has no clear understanding of the numbers of jihadists who fled to take up arms or to join family members, but it has adopted a US Central Intelligence Agency estimate of 689 people.

Of that large number, it has established the identities of 228, but Mr Mahfud concedes there is "little data" on the remaining 461.

"The Government will gather more data and verify more accurately the identity and profile of [those] who were involved in terrorism by joining ISIS," he said.

Whatever the precise number, most survivors of the war are now detained, scattered through Syria, Turkey and Iraq.

At the height of its savage rampage in the period 2014–2017, ISIS propaganda highlighted its success in luring Indonesians, especially young boys who were paraded as armed child jihadis.

Indonesian policeman Syahputra, who reportedly died fighting with Islamic State in 2015. ( Supplied )

Most would now be teenagers or even young adults, but the fate of younger children currently aged under 10 years old hasn't yet been determined by the Government.

Mr Mahfud has signalled "the children under 10 years old will be considered "differently" on a "case by case basis", explaining that some could be orphans.

As with other countries, including Australia, some legal uncertainty surrounds Indonesia's obligations to any man, woman or child who wants to return.

Evidence shows large numbers of the Islamic radicals had burnt Indonesian passports and official papers, possibly voiding their citizenship in the process.

Indonesian law also provides grounds for stripping citizenship from anyone who has fought in support of a foreign force.

President Jokowi's cabinet meeting in Bogor did not discuss the finer points on their legal status before reaching a decision Mr Mahfud said was made "because if these people are returned, the terrorist virus could make the rest of Indonesia feel insecurity".

Terrorist attacks rock Indonesia

The lock-out does not guarantee Indonesia is immune from the ideology of Islamist militants, because many foreign fighters have already managed to return and ISIS-inspired sympathisers pose a constant threat to security.

The terrorist organisation has claimed credit for, or had links to, more than a dozen deadly attacks in the past two years.

In 2018, suicide bombers used children in a wave of targeted hits on Christian churches and a police building in the city of Surabaya, killing 13 proclaimed ISIS "martyrs" and 12 victims.

Police stand guard outside the local police headquarters following a terror attack in Surabaya in 2018. ( AP: Achmad Ibrahim )

Last year, a married couple believed to be motivated by the outlawed terror group stabbed senior security minister and former army general Wiranto in a shambolic assassination attempt at a public event in west Java.

Adding to the size of the security challenge, prominent offshoot groups sharing Islamic State's radical ideologies also attract strong public political support at home among Muslim hardliners, even if they do not resort to violent terror tactics.

The Government's decision to block the return of its legion of foreign fighters leaves the estimated 689 Indonesians stranded indefinitely in prisons and camps, defying the wishes of countries like Turkey which are anxious to have them repatriated.