The film concludes with best friends Sophie and Agatha saving their magical school and the Endless Woods from the sinister Rafal. After Sophie embraces her inner goodness and Agatha her darkness, they are able to restore balance. Tedros becomes king, making Sophie his queen so she can rule beside him and continue growing. Agatha decides to remain a teacher at the school to nurture the next generation. The two girls have found where they truly belong. Their friendship remains strong despite their opposing alignments. As Sophie and Agatha wave goodbye while floating away in a hot air balloon, the ending suggests they are headed toward new adventures while maintaining the special bond that helped them discover themselves and save the kingdom.