The teen will spend at least six months in the juvenile detention centre, charged with attempting to join a terrorist organization, according to Spain's ABC newspaper.
She appeared "completely" convinced she was doing the right thing by joining the jihadist group Islamic State of Iraq and the Levant (ISIL), judicial sources told El País newspaper.
Described as well-educated, the 14-year-old had apparently been a 'normal' girl until four months ago.
However, she had then become radicalized via a diet of jihadist chat forums and social media platforms, and had made up her mind that she would join ISIL.
She had been only "two of three" days from being sent to Iraq when arrested, sources told El País.
Another teen, 19-year-old Fauzia Allal Mohamed (below), who was arrested with the 14-year-old, was released without bail by a Madrid judge on Tuesday, also facing charges of intending to join a jihadist group — charges she has denied, according to ABC newspaper.
Photo: Spain's Interior Ministry
After testifying in front of Judge Santiago Pedraz, the 19-year-old was granted probation along with a series of cautionary measures she will have to abide by to keep her freedom.
These include appearing before her local court on a weekly basis, handing in her passport, a ban on her leaving Spain and providing a phone contact and address at which she can be easily located.
The magistrate also imposed a gag order on Fauzia Allal Mohamed’s hearing.
News of the girls’ arrest broke on Monday in Spain, the country’s Interior Ministry describing it as “unprecedented” as they are the first Spanish women to be stopped from joining the ‘Holy War’ in Syria and Iraq.
Video footage released by the Spanish authorities showed the two women,both covered in black niqabs, being led away from a small propeller plane, each flanked by balaclava-clad security men.
The pair were detained at the Beni Enzar border crossing in Melilla, one of two tiny Spanish territories on the north African coast. Both Melilla and the other Spanish city, Ceuta, share a border with Morocco.
"Both were trying to cross the border to Morocco with the aim of contacting the network which would move them immediately to a conflict zone between Syria and Iraq," the Spanish ministry said.
The recruitment of a minor showed that the network had no regard for its targets' sex, age or personal situation, the ministry said, adding that an investigation remained open.
The Spanish government has said it fears battle-hardened Islamist fighters may return to Spain from Syria and other conflict zones under the influence of Al-Qaeda-inspired groups, posing a threat of attacks.
Spanish security forces have led at least three significant raids on jihadist recruitment cells this year, arresting more than 20 people.
Spain this year marked the 10th anniversary of the March 11, 2004, Al-Qaeda-inspired bombing of four packed commuter trains in Madrid, which killed 191 people.
Since the train bombings, more than 470 suspected Islamic extremists have been arrested in Spain, according to the government.