ISLAMABAD, Pakistan (CNN) -- Taliban militants on Wednesday released a dozen boys a day after abducting them on suspicion of spying for the Pakistani military, a Pakistani military source said.
The children were seized from a high school in northwestern Pakistan on Tuesday and released a day later after their parents assured the Taliban that the children would no longer act as spies, the source said. The military source denied that the 12 youngsters ever worked as spies.
All 12 boys are in good health, the source said.
The Taliban accused the students of giving security forces information about the whereabouts and movements of the Taliban, according to the source.
The source said the kidnappings may be an effort by the Taliban to deter any would-be spies with the threat of abduction.
Armed militants stormed into the Nazarabad Government High School in Arkot Tehsil Matta, a village in the Swat region of the North West Frontier Province, on Tuesday and seized 15 children, three of whom managed to escape, the source said.
The remaining 12 were driven away in several cars, he said. He said the parents bypassed local law enforcement, who were investigating the kidnappings, and spoke directly to the militant group -- an indication of the Taliban's presence and authority in the region.
Muslim Khan, spokesman for a Taliban group led by the radical cleric Maulana Fazlullah, has accused the school students of spying for Pakistani security forces in the Swat region.
Fazlullah's militant group has launched a violent campaign to enforce Taliban-style laws. They have also been blamed for destroying scores of schools in the region, most of them girls' schools, calling them un-Islamic.
The Swat region has also been the scene of heavy fighting since the Pakistani military launched an offensive against militants in northwest Pakistan in early August.