Nearly 300 Nigerian schoolgirls kidnapped last week by terrorists have been released.

The governor of the state of Zamfara, Bello Matawalle, says that all the girls were released and that no ransom had been paid, the Associated Press reports.

“Today, we have received the children who were under captivity since Friday. I initiated a peace accord which yielded a positive result. No ransom was paid to anyone. I insisted that we were not going to give anything to any of them,” Matawalle told the news agency on Tuesday.

On Friday it was reported that 317 girls were abducted by the terrorists. Government officials say that some of the girls had run into the bush at the time of the assault and confirmed that the number of girls kidnapped was 279.

This was the third such attack on schools in the past three months.

“Alhamdulillah! (God be praised!) It gladdens my heart to announce the release of the abducted students,” Matawalle said in a post on Twitter early Tuesday. “I enjoin all well-meaning Nigerians to rejoice with us as our daughters are now safe.”

The country's President, Muhammadu Buhari, also joined in celebrations on Twitter, saying "I join the affected families and the people of Zamfara State in welcoming and celebrating the release of the abducted  students of GGSS Jangebe. This news bring overwhelming joy. I am pleased that their ordeal has come to a happy end without any incident."