SYDNEY — New Zealand, bowing to pressure, has agreed to repatriate a suspected member of the Islamic State terrorist group who grew up in Australia and was detained by Turkish authorities in February as she attempted to cross the border from Syria illegally with her two young children.

The woman, identified in local media as Suhayra Aden, was one of a number of women who traveled from Australia to allegedly join the terrorist group and marry fighters, as “jihadi brides,” around seven years ago.

Aden’s family moved to Australia from New Zealand when she was 6, making her a dual citizen, and she departed for Syria in 2014 on an Australian passport, according to officials. But Australia revoked her citizenship and canceled her passport, which sparked a diplomatic row and left New Zealand to deal with her predicament.

“New Zealand has not taken this step lightly,” Prime Minister Jacinda Ardern said Monday. “They are not Turkey’s responsibility, and with Australia refusing to accept the family, that makes them ours.”

The prime minister said “great care” is being taken to minimize the security risks in returning the woman and her young children to New Zealand.

Authorities haven’t yet said whether Aden will be charged with any offenses in New Zealand. “It has previously been made clear that any New Zealander who might be suspected of association with a terrorist group should expect to be investigated under New Zealand law,” Ardern said, adding that was a matter for police.

While the Turkish government labeled her a terrorist as a member of the Islamic State, it remains unclear whether Aden participated in fighting or acts of terrorism.

The decision follows months of political wrangling over the issue. At the time of the woman’s arrest, Ardern said Australia had “abdicated its responsibilities” toward the then-26-year-old woman. Although she was a dual citizen of New Zealand, Ardern noted that Australia was where her wider family lived and the place from which she departed for Syria. Yet Australia’s Prime Minister Scott Morrison contended in February that it was his job to “put Australia’s national security interests first.”

“As most New Zealanders know, I made very strong representations to Australia that she should be permitted to return there,” Ardern said Monday. “Unfortunately, Australia would not reverse the cancellation of citizenship.” She said Australia had agreed to consult with New Zealand if any similar cases arose in future.

Deborah Manning, a lawyer for the detained woman, told the New Zealand Herald that Aden is looking forward to starting the next chapter of their lives in New Zealand.

“I think like any mother her focus is very much on her children and she is most of all just wanting privacy and time with them to let them have as much of a normal life as is possible to be able to cope and deal with everything they’ve been through,” Manning told the paper.

According to Australia’s state broadcaster ABC, Aden married and had three children to two Swedish men in Syria, who both died.

The woman lost her Australian citizenship under a legal provision that has since been repealed. The law stated that anyone over the age of 14 would lose their passport automatically — without any oversight by officials — if they had either fought for a declared terrorist organization or engaged in “disallegient” conduct. Legal experts say the Australian government adopted these “automatic” mechanisms in part to avoid any decision around citizenship being subject to judicial review. Such decisions are now reviewed by the home affairs minister.

The law around repealing citizenship also stated people should not be rendered stateless by the decision; a condition that was met in Aden’s case by her dual New Zealand citizenship.

“We have taken into account our international responsibilities as well as the details of this particular case, including the fact that children are involved,” Ardern said Monday. “New Zealand is not able to remove citizenship from a person and leave them stateless, and as New Zealand citizens this country is the only place where they can currently legally reside.”

Read more: