BORAS, Sweden — A teenage girl rescued from the Islamic State last week by Kurdish special forces has returned to Sweden, the country’s Foreign Ministry said on Friday.

The girl, Marilyn Nevalainen, who is now 16, left for Syria last year, traveling on trains and buses with her boyfriend, then 19, a Muslim she had met in Sweden. She eventually reached the Islamic State-controlled city of Mosul, in Iraq.

“We can confirm that a Swedish minor is back in Sweden,” Veronica Nordlund, a spokeswoman for the Foreign Ministry, said. “Her return was brought about by a collaboration with various agencies in Sweden,” she added, declining to comment further.

Neither the Foreign Ministry nor the Swedish police said where Ms. Nevalainen was staying or whether she was in protective custody, but Thomas Strand, an official with the social services office in the municipality of Mark, where she lived before leaving the country, said that in such cases a minor would usually be held for questioning by the police.