WELLINGTON (Reuters) - A New Zealand man detained in Syria after joining the Islamic State militant group will not be stripped of citizenship but could face criminal charges if he returns, Prime Minister Jacinda Ardern said on Monday.

New Zealand is the latest of a number of countries, from Australia and Britain to the United States, forced to grapple with legal and security challenges in dealing with former members of a hardline group that had sworn to destroy the West.

Mark Taylor, who traveled to Syria in 2014, told Australian broadcaster ABC from a prison in the Kurdish-run north that he expected to face time in prison if he returned to New Zealand.

Taylor’s joining the group was illegal and could have legal ramifications, Ardern said, but added that her government would provide him with a travel document to return, if possible.

“We have long had plans in place in the event that a New Zealand citizen supporting ISIS in Syria were to return,” Ardern told reporters, using an alternative name for the group.

“Mr Taylor only holds New Zealand citizenship and the government has an obligation not to make people stateless.”

Ardern said officials had identified that a small number of New Zealanders had joined IS, but declined to give an exact number.

New Zealand law allows revocation of citizenship only in limited situations, Ardern said, adding that the government could not render stateless anyone who did not have dual citizenship.

Officials had told Taylor he would need to travel to a country where New Zealand has a diplomatic presence, such as Turkey, to receive an emergency travel document to return, said Ardern, adding that would be difficult as he is in detention.

In an interview aired on Monday, Taylor told the ABC that he had worked as a guard for the group for five years and had been detained in its prisons a number of times, such as after he accidentally leaked location details in a tweet in 2015.

He also appeared in an IS promotional video that year, calling for attacks on ANZAC Day celebrations in Australia and New Zealand.

Taylor told ABC he had witnessed executions while with the group and was sorry.

“I don’t know if I can go back to New Zealand, but at the end of the day it’s really something I have to live with for the rest of my life,” he said.

In February, Britain said it was revoking the citizenship of 19-year-old Shamima Begum, who had left London with two school friends to join up when she was 15, but now sought to return with her newborn son.