At least 47 people, most of them students, have been killed after an explosion ripped through a secondary school in northeast Nigeria, as students gathered for morning assembly before classes began.

Police said a suicide bomber disguised in a school uniform carried out the attack at the Government Comprehensive Senior Science Secondary School in Potiskum, Yobe state.

"There was an explosion detonated by a suicide bomber. We have 47 dead and 79 injured," national police spokesman Emmanuel Ojukwu said, adding that the armed group Boko Haram was believed to be responsible.

We were waiting for the principal to address us, around 7:30am, when we heard a deafening sound and I was blown off my feet, people started screaming and running, I saw blood all over my body. Musa Ibrahim Yahaya, student

More than 2,000 students had gathered for Monday morning's weekly assembly at the school when the explosion blasted through the school hall, according to survivors.

"We were waiting for the principal to address us, around 7:30am, when we heard a deafening sound and I was blown off my feet, people started screaming and running, I saw blood all over my body,'' 17-year-old student Musa Ibrahim Yahaya told the Associated Press.

The student was being treated for head wounds at the Potiskum General Hospital - located just hundred metres from the school - where dozens of others were also admitted.

Schools ordered closed

There was no immediate claim of responsibility but Boko Haram frequently attacks schools in northern Nigeria, where the fighters have control over large areas.

"Boko Haram particularly targets schools because they are soft targets. And they represent everything the group is against - Western education, lifestyle and civilisation," Al Jazeera's Ahmed Idris, reporting from the Nigerian city of Lagos, said.

Boko Haram is seeking to establish an Islamic state in northern Nigeria. The group's name translates roughly as "Western education is sinful" in the local Hausa language.

Yobe state governor Ibrahim Gaidam ordered the immediate closure of all public schools in the Potiskum area and slammed the government in Abuja for failing to stop attacks.

"Urgent action must be taken right now to restore a fast-waning public confidence by doing whatever it takes to stop the escalating violence," he said in a statement.

The government is under pressure to take adequate security measures to protect schools, especially after more than 200 female students were abducted in April.

Yobe is one of three northeastern states that has been under a state of emergency since May last year. But violence has continued unabated and Boko Haram has seized at least two dozen towns and villages in recent months.

Another suicide bombing in Potiskum killed 30 people one week ago, when suspected Boko Haram fighters attacked a procession of Shia Muslims marking Ashoura.