The secondary school principal was also released by the group who had seized almost 80 children in the troubled English-speaking region.
The last two students abducted from a school in Cameroon have been freed - along with their principal and a warden.
Gunmen who raided the school in the troubled English-speaking region had already released almost 80 children.
They were taken last week from the Presbyterian Secondary School in the city of Bamenda.
"I can confirm all the hostages are free," said Louis Begne, a regional government spokesman, without providing details on their release. Samuel Fonki, the minister of the Presbyterian Church who negotiated the release, confirmed that everyone had been freed.
The military and Fonki blamed the abduction on anglophone separatists. A school source said the armed group had not demanded a ransom but the closure of the school.
Separatists, who are fighting to form a breakaway republic called Ambazonia, have use stopping children going to school as a tactic.
A spokesman for the separatists denied this and said the Cameroonian army carried out the kidnapping.
Cameroon is among 81 countries have signed the Safe Schools Declaration - a commitment to keep students, teachers and their schools free from the fear of violence and occupation during armed conflict.
Theirworld and others have been campaigning for schools to be safe places for children to learn and be with their peers. While the majority of the 15 current members of the Security Council have signed the Safe Schools Declaration, only two of the five permanent members have done so.
France and the United Kingdom have shown the way by endorsing the declaration and we are calling on China, Russia and the United States to follow their lead.