ACT 1. A merry entertainment is being held in a village in Moson County. Ordító, the village cantor appears with his daughter, Sarolta. The sound of the shepherd Márton's flute can be heard in the distance. The curious crowd pour out of the hall, leaving only Orditó and his daughter. Ordító has long been sad that his daughter has not married. He would like a grandson to carry on his occupation. Sarolta admits that she has already chosen, she is in love with Gyula, the king's knight. Gyula approaches. Sarolta and her father conceal themselves and listen to his love song. Sarolta steps forward and encourages Gyula to ask her father to agree to their marriage. Ordító likes the knight too, and agrees to the marriage. Sarolta and her father leave. The king arrives and asks Gyula to change roles with him. When he remains alone he admits that he too is in love with Sarolta. Sarolta appears but the king pays court to her in vain, she remains true to her chosen one. Ordító enthusiastically approves and disparages the king who is courting in the guise of the knight. Baron Belus notices the king's passion and wants to prevent him at all costs from getting close to Sarolta.
ACT 2. A declaration of war arrives, the king's illegitimate son is preparing to attack Hungary. The king surprises Sarolta and once again declares his love for her; Ordító appears too and scolds the king in disguise. In the meantime Gyula turns up and the exchange of places is revealed. Ordító is overcome by ambition. In the new situation he decides that it would be better if his daughter became the queen. He urges his daughter to accept the king's love, but Sarolta remains steadfast.
ACT 3. The king in disguise declares that he is prepared to marry Sarolta under the false name of Gyula. Belus is vigilant and prevents the irresponsible marriage. In the meantime Ordító argues with his daughter because he would like her to choose the king as her husband. Then Belus arrives with the king's order that Sarolta should be the wife of the knight Gyula. Belus is well aware that the king wants to marry Sarolta while disguised as Gyula so he quickly summons the knights and married him to the girl. Ordító still believes that the king is his son-in-law and the truth is only revealed when the king returns victorious from the battle. The disappointed king banishes Gyula, but at the same time makes him commander of Moson fortress.