LONDON — Several unaccompanied children have been repatriated from former Islamic State territory in Syria to Britain, as European nations grapple with questions about what to do with the potential return of citizens who joined the terrorist group.

On Friday, Prime Minister Boris Johnson said that the children’s repatriation had been “a great success,” but he cautioned that it would be “over-optimistic to say that we could do it in every single case.”

The British foreign minister, Dominic Raab, said in October that “unaccompanied minors or orphans” who were caught up in the fighting in Syria could be returned to Britain “assuming they would not represent a security threat.”

On Thursday, Mr. Raab said that repatriating such children “was the right thing to do.”

“These innocent, orphaned, children should never have been subjected to the horrors of war,” Mr. Raab said in a statement. “Now they must be allowed the privacy and given the support to return to a normal life.”