A group of gunmen took around 30 students and teachers hostage on Monday from a high school. After several hours inside the school, which was in northwest Pakistan, they surrendered and released the hostages.
According to Pakistani President Pervez Musharraf and officials, no one was hurt as all of the hostages came out unharmed.
The hostage-takers were handed over to the custody of tribal elders.
The elders were helping police negotiate with the man.
The hostage-takers will not be charged for their actions though and were set free after giving up their weapons.
Reports are that the gunmen are not part of the Taliban of al Qaeda, but are instead just local criminals who do such things for ransom payments.