An Irish woman detained in Syria on suspicion of association with Islamic State can return to Ireland with her two-year-old child, the country’s prime minister has said.

Leo Varadkar said he did not believe removing Lisa Smith’s citizenship was the “right or compassionate thing to do”, but warned she would face investigation and potentially prosecution if she had been involved in any crimes.

His approach will further highlight the controversy surrounding the decision by Sajid Javid, the UK home secretary, to strip Shamima Begum of her citizenship.

A TV crew working for ITV News visited the al-Hawl refugee camp in northern Syria two weeks ago and interviewed a woman wearing a burqa, who claimed to be British but had an Irish accent.

Smith, like Begum, recently fled from Baghuz, the final Isis stronghold in Syria.

She was a member of the Irish Defence Forces until 2011, but quit after converting to Islam.

Varadkar told reporters on Monday: “We really need to get to the bottom of the facts here … [and] carry out a security assessment to see if the Syrian authorities want to carry out a prosecution or not.

“But ultimately, this is an Irish citizen, and we don’t believe that removing an Irish citizen’s citizenship from her or her family, rendering them stateless, would be either the right or compassionate thing to do.

“We still don’t have full information about this case. Each of these cases is going to have to be treated differently.”

Smith moved to Syria via Tunisia in 2015, shortly after leaving the Air Corps, where she worked as a flight attendant on the government plane and a driver to senior officers, according to Irish media reports.

On Sunday, the UK foreign secretary, Jeremy Hunt, said Begum had chosen to “leave a free country to join a terrorist organisation” and confirmed her son Jarrah, who died on Saturday, was a British citizen. He said it was too dangerous to send officials to refugee camps.

This was despite reports that scores of British officials have been present in north-eastern Syria for at least the past two years.

Javid was accused of moral cowardice by stripping Begum of her citizenship, with a former director of public prosecutions saying he was putting his “leadership ambitions” ahead of the rights of a “vulnerable British baby”.

Up to 3,000 infants born to foreign nationals are thought to be at risk.