There were about eight explosions at intervals of several minutes, witnesses said. Some gunfire also erupted but both the blasts and gunfire stopped after about 20 minutes.
''They were warning blasts. We have not yet entered the mosque,'' said the official, who declined to be identified.
The blasts, about an hour before sunrise, were followed by an announcement from security force loudspeakers outside the Lal Masjid calling on students inside to give up, a witness said.
''All people in the mosque should surrender or they will be responsible for losses,'' the witness, who lives in the neighbourhood, cited security forces as saying over loudspeakers.
Sixteen people have been killed in violence that erupted at the mosque on Tuesday after a months-long stand-off between the authorities and a Taliban-style movement based there.
The security official said part of a wall of the sprawling mosque compound had been brought down by one of the blasts, and security forces had also fired in teargas.
Hundreds of police and soldiers, backed by armoured personnel carriers and with orders to shoot armed resisters on sight, sealed off the mosque and imposed an indefinite curfew in the neighbourhood after Tuesday's clashes.
Reporters in the vicinity said security forces have ordered them away as the blasts began.
In a major coup for the government, the head of the mosque was arrested yesterday while trying to escape clad in a woman's burqa.
Chief cleric Abdul Aziz had tried to slip out of the mosque among women from a hardline religious school in the mosque compound who wear black, all-enveloping burqas.
Up to 1,200 students based at the besieged mosque, took up a government offer of safe passage and 5,000 rupees () and surrendered yesterday.
There were intermittent exchanges of gunfire at the mosque yesterday but less intense then the clashes the previous day.
Aziz runs the mosque with his brother, Abdul Rashid Ghazi, who was still inside the mosque, along with many militant supporters who were defying government ultimatums to surrender.
A senior government official said clerics had been negotiating with Ghazi, trying to persuade him to surrender.
Liberal politicians have for months pressed President Pervez Musharraf to crack down on the clerics, who had threatened suicide attacks if force was used against them.
Some critics suggested that the government initially saw the trouble as a welcome distraction from a judicial crisis over Musharraf's suspension of the country's top judge in March.
But heavy loss of life in any assault would be very damaging for Musharraf in the run-up to elections this year.
No one knows how many students, who range in age from teenagers to people in their 30s, remain in the mosque. Officials gave estimates from several hundred up to 5,000.
A security official said a small, hard core was unlikely to give up and two bomb attacks on security forces yesterday in another part of the country that killed 12 people raised fears militant supporters of the mosque were hitting back.
The Lal Masjid movement is part of a phenomenon known as 'Talibanisation', or the seeping of militancy from remote tribal regions on the Afghan border into central areas.
The mosque has a long history of support for militancy but the latest trouble began in January when students occupied a library to protest against the destruction of mosques illegally built on state land. They later kidnapped women they said were involved in prostitution and abducted police.
Internal acts responsible for present crisis in Pak
Curfew imposed at Pak mosque after 11 killed
Talks to end Pak mosque siege failed
Lal Masjid - radical bastion in Pak capital
Pak sends surrender ultimatum to mosque militants>