The suspect, named as Samira Yerou, was sent to Spain by Turkish authorities after they caught her trying to illegally enter Syria, Spain's interior ministry said. Spain had issued an international arrest warrant for the woman.
Spanish authorities, who believe Yerou was seeking to meet up with IS, took her into custody yesterday after she flew into Barcelona-El Prat Airport.
Yerou "could have played an important role in recruiting and sending of women sympathisers of the terrorist group in Europe and Morocco," the ministry said.
"The child is in perfect health and has been reunited with his father," the ministry said.
More From This Section
Like many European countries, Spain is battling against the radicalisation of young people seeking to join up with IS in Syria and Iraq and it has dismantled several recruitment networks in recent months.
Spanish authorities believe about 100 Spaniards have joined Islamist militants in Iraq and Syria, a relatively low figure when compared with the number of French, British and German nationals who have sought to fight with the group.