Captured British Islamic State fighters will be brought back to the UK if they can be put on trial, the UK's national security advisor said.
Sir Mark Sedwill suggested some detainees held in Syria could be repatriated if they can be prosecuted in the UK.
But he said that should only if the UK is the best place for them to face justice.
Speaking at an international security conference in Bahrain, he said it may be better for British IS fighters to be put on trial in the countries where they committed their crimes.
He told the International Institute for Strategic Studies' Manama Dialogue:
"We want foreign fighters, who have been captured, dealt with through the criminal justice system but they have to be dealt with through the justice system in the most appropriate place possible.
"So if we can bring them back to the UK and put them through our justice system and deal with them appropriately, we will.
"If it is better done elsewhere, then we will work with allies to do that."
Sir Mark further indicated more British children, whose parents were members of IS, could be repatriated after a group of orphans was brought back to the UK.
It was the first time that the Government had agreed to bring the families of suspected jihadists back to Britain.
"If others find themselves in the same circumstances and it is possible to do so then the same principle will apply," Sir Mark said.
"But people should not underestimate the practical challenges and security challenges of doing that safely.
"The primary responsibility, of course, for the welfare of these children is the parents, who in effect abused and victimised them by taking them to a war zone and allowed them to be indoctrinated in the first place.
"But they are Brits and we have a responsibility to them," he added.
There are still as many as 60 British children that remain stranded in Syria.
Last month, the two suspected British IS terrorists dubbed The Beatles were taken from Syria into American custody.
Alexanda Kotey and El Shafee Elsheikh, both in their 30s, were moved by US security services to an "undisclosed location" amid fears they could escape custody as Turkish troops invaded the Syrian Kurdish-held region of north-eastern Syria.
Shamima Begum, the Bethnal Green schoolgirl who fled to Syria to join IS in 2015, was stripped of her British citizenship, prompting her to take legal action against the UK.
In August, 24-year-old "Jihadi" Jack Letts was also stripped of if British citizenship, after leaving his Oxfordshire home to join IS in Syria in 2014 at the age of 18.