Chaudhry Mohammed Ali, the city's deputy administrator, said more than 1,000 people inside the mosque had surrendered.
Tariq Azim, the deputy information minister, said all women and children would be granted amnesty, but men involved in killings and other crimes as well as mosque leaders would face legal action.
One who decided to give up, 15-year-old Maryam Qayyeum, said those who stayed in the madrassa or religious school, "only want martyrdom".
"They are happy," she said. "They don't want to go home."
President Musharraf has said each of those who surrendered would receive 5,000 rupees ($83).
On Wednesday, a senior cleric at the mosque, Abdul Aziz Ghazi, was arrested by Pakistani security forces, after trying to escape the compound.
Mohammad Ali Durrani, the information minister, said: "He was trying to escape with the girls and was wearing a burqa."