Police spotted the cleric's unusual demeanour amid a group of girls

Security forces seized Maulana Abdul Aziz as he tried to leave the Red Mosque amid a crowd of women.

The mosque is surrounded by Pakistani troops after gun battles with armed students killed 16 on Tuesday. They have been told to give themselves up.

Clerics at the mosque are campaigning for Islamic Sharia law to be enforced.

The BBC's Syed Shoaib Hasan in Islamabad says that there is a feeling that the siege may be entering its end stages as three senior Muslim clerics have entered the mosque to try negotiate with Abdul Rashid Ghazi, the deputy leader of the mosque and brother to Abdul Aziz.

Security forces have also been moving around inside the compound, our correspondent says.

Abdul Rashid is reportedly saying that he is willing to surrender if certain demands are met however, the government remains adamant that all armed people inside the mosque should surrender unconditionally.

The deputy commissioner of police in Islamabad, Chaudhry Muhammad Ali, described how Abdul Aziz tried to escape wearing the all-enveloping dress worn by Muslim women.

"The maulana came out of the mosque with a group of girls wearing a burka and carrying a handbag. The girls protested when he was stopped. But officers were suspicious and after a search, Maulana Abdul Aziz was identified and arrested," he told the BBC.

Another security official told AFP that the cleric had been picked out because of his "unusual demeanour".

"The rest of the girls looked like girls, but he was taller and had a pot belly," the official said.

Abdul Aziz was captured as more than 700 of his followers surrendered to government forces.

Protests

As news of the arrest filtered through, a small group of his supporters gathered outside the cordoned-off area to protest.

Female students who were let out were being allowed to go home, while male students were being held and searched.

The authorities have extended the deadline for students to surrender.

They say they want to allow as many as possible to leave peacefully, but they also say they are prepared for force, says the BBC's Barbara Plett in Islamabad.

Security officials estimate that eventually a hard core of several hundred militants will be left, but it is not clear whether the arrest of Abdul Aziz will help to resolve the situation, our correspondent says.

Earlier, troops in armoured personnel carriers surrounded the mosque as helicopter gunships circled overhead and gunfire was heard.

Several thousand people remain inside the Red Mosque (Lal Masjid) complex, and many of them are young students at a girls' school.

In addition to the 16 people killed during Tuesday's violence, more than 140 people were hurt, officials said.

Curfew

Troops sealed off the area around the mosque after Tuesday's clashes and no-one is able to get within about one kilometre of the site.

At daybreak, soldiers strung barbed wire across streets near the mosque, where armed students have barricaded themselves in.

An indefinite curfew is in place around the Red Mosque, and power and water supplies have been cut off.

Those inside have been ordered to give up their weapons, although officials have said they do not want more bloodshed.

Clerics, acting as intermediaries, held overnight talks with both sides, but there has been no sign of a breakthrough.

At least two deadlines set by the government for students to surrender have passed.

The government has said women and children can go free - with offers of money and safe passage - but top mosque leaders and males involved in killings and other crimes will face prosecution.