LONDON — A judge sentenced a British woman on Monday to six years in prison for going to Syria to live under the rule of the Islamic State group.

Tareena Shakil, 26, was convicted last week of being a member of the group and encouraging acts of terrorism.

In October 2014, she and her 1-year-old son boarded a plane to Turkey and then traveled to Syria. After three months, Shakil fled, taking a taxi from the IS stronghold of Raqqa to the Turkish border and then returning to Britain. She was arrested at Heathrow Airport in February 2015 and her son has since been taken into social care.

Shakil, from Birmingham in central England, denied the charges, claiming she wanted to live under strict Islamic law, not support terrorism, and telling jurors she had made a mistake.

But prosecutors said photos on her phone showed her posing with a firearm and her son wearing a hat with the IS logo.

Judge Melbourne Inman said Shakil had embraced the Islamic State group and sent messages home saying “that it was part of your faith to kill the murtadeen (apostates) and … you wanted to die a martyr.”

“You were well aware that the future which you had subjected your son to was very likely to be indoctrination and thereafter life as a terrorist fighter,” the judge said.

Like other European countries, Britain is increasingly concerned about residents —including a growing number of women — traveling to Syria to fight or support militants. Officials say 56 girls and women from Britain went to Syria last year.