Students at a hardline Islamic school in Pakistan's capital have released the alleged owner of a brothel and three members of her family after forcing her to publicly apologize. 

Wearing a burqa and appearing before reporters, the woman vowed to live a more pious life. She, her daughter, her daughter-in-law and her infant granddaughter later returned home.

Female students at the Jamia Hafsa madrassa (religious school) kidnapped the four on Wednesday as part of an anti-vice campaign.

Police responded by arresting teachers linked to the kidnappers, and then male students kidnapped two policemen. The two sides later agreed to free the additional hostages.

The kidnapping was the school's latest anti-vice campaign in Islamabad, which is more secular than religiously conservative regions near Afghanistan.

Since January, students from the madrassa of the conservative Lal Masjid mosque have held a sit-in at a nearby children's library to protest the government's decision to demolish illegally constructed mosques.

Some information for this report was provided by AP.