By Zaffar Abbas
BBC News, Islamabad
Pakistan says it has resolved a dispute with religious schools and they will now register with the government.
The madrassa grouping says none of its schools are extremist
President Pervez Musharraf enforced his registration demand following the London bombings in July and also said all foreign students must be expelled.
The madrassas had refused to co-operate unless a demand that they disclose their funding be withdrawn.
A senior religious affairs ministry spokesman told the BBC the madrassas would not need to disclose funding.
President Pervez Musharraf says his registration policy is aimed at checking the activities of a handful of madrassas that preach hatred and extremism.
One of the London bombing suspects visited a madrassa in Lahore shortly before the attacks.
'No hidden agenda'
Prime Minister Shaukat Aziz made the announcement of the agreement soon after talks with representatives of the grouping of five associations of Islamic seminaries, the Ittehad-e-Tanseem ul-Madaris-e-Deenia (ITMD).
Details were not disclosed but the religious affairs ministry spokesman said the madrassas would only have to submit their annual financial report at the end of every year.
An official statement said the two sides agreed to register nearly 13,000 Islamic seminaries by the deadline of 31 December.
The statement said that, during the meeting, Mr Aziz assured the madrassa representatives that the government had no hidden agenda and registration was not being enforced because of any outside pressure.
However, he said the government wanted to discourage teaching which developed negative tendencies and hatred, and led to sectarianism and terrorism.
Such practices, Mr Aziz said, were against the teachings of Islam.
ITMD spokesman Mufti Muneeb-ur-Rehman said none of the madrassas linked with its five associations had been involved in violence or militant activities.
They had no problem in being registered, he said.
Mufti Rehman said they were pleased that the issue had been resolved amicably.
The registration and the government's demand for a revision of the religion-based curriculum has been a contentious issue as some Islamic groups said it was being done under pressure from the United States.
Pakistan's government says most madrassas have only been offering Koranic teachings and have resisted the inclusion of subjects such as literature, or social or pure science.