A New Zealand native who joined the Islamic State should not lose his citizenship but may face charges if he returns home, the country’s prime minister said on Monday, outlining a milder approach than Britain and the United States have taken toward citizens with ties to the group.

The New Zealander, Mark Taylor, was widely ridiculed when he forgot to turn off Twitter’s location tagging function in 2014, and inadvertently gave away the positions of Islamic State fighters in Syria.

On Monday, the ABC, Australia’s public broadcaster, quoted Mr. Taylor as saying that he had fled the Islamic State in December and surrendered to Kurdish forces because living with the terrorist group had become too difficult. The ABC said he was being held in a Kurdish prison.

Prime Minister Jacinda Ardern told reporters on Monday that New Zealand had plans in place for any Islamic State fighters who try to return.