Buda is mastered by the Turks. Student Gábor and his companion flee a troop into the castle, just in the garden of Gül Baba. Gábor and Leila, the daughter of Gül Baba fall in love with each other. Ali pasha, who wants to marry the girl, has the two Hungarians caught in order to let them be executed.
Nagy István, the formerly poor peasant boy returns to his native village as a teacher. His conviction is that the abyss between rich and poor can be diminished by good will. The rich Böröcz Horváth Klári returns his love, and also Böröcz Horváth is willing to help the poorest family, the Bakos. Bakos Jóska, who was sent to serve the tough Böröcz Horváth as a payment, dies of an infected wound and the people in the village hold the teacher liable as well. Nagy István realises, that the abyss cannot be ceased, what is more, it is impassable. He breaks up with his fiancée and stands by the side of the poor.