Act I
On the floor of a barn, Đula husks corn with her friends. She daydreams about a stranger who has recently been sending her gifts. Suddenly, out of the hay-stack drops Mića, a merry young lad dressed as a pauper. He introduced himself as Ero the Joker, and he tells Đula that her late mother is sending her a sweetheart. Đula’s stepmother Doma breaks up the gathering. She orders Đula to do her chores and chastises Mića when he offers to help. Mića warns Doma that her stew is about to burn, and she leaves in an angry huff. Alone with Đula, Mića admits that it was he who sent her the gifts. Đula falls in love with him, and they agree to meet near the village mill just before her father Marko arrives home.
Mića asks Marko for lodgings, but Marko sends him off because he is in rags. Doma has heard rumours that a mysterious person from another world is in town. She wants to know how her late first husband Matija is doing. Mića tells Doma that in that other world everything has to be paid for just like here on Earth, and that her late husband is broke. Upset, Doma gathers Marko’s entire savings and gives them to Mića. He leaves happily, promising to pass the money onto Matija. When Marko finds Doma in tears, she tells him the whole story. He alerts his men and the entire village starts to chase after the thief.
Act II
At the mill, Sima the miller sings merrily while the village women arrive with their grain. The last one to arrive is Doma, who demands that her grain be ground first. In the ensuing row Doma insults the other women and Sima snaps at Đula. The step-daughter grieves for her late mother and then leaves the mill but forgets to take the horse’s feedbag.
While cleaning the mill, Sima hears a clatter of hooves approaching from afar. It is Marko in pursuit of the thief, but the miller mistakenly believes that Marko is coming after him because of his fight with Doma and Đula. When hides in fear, Mića sneaks into the mill and disguising himself as Sima. Marko arrives at the mill and asks which way the thief went. Pretending to help, Mića sends Marko in the direction of the miller, promising to guard his horse while he searches for the thief.
Đula returns for the forgotten feedbag. She is surprised to find Mića there and is angry at him for leaving her without saying goodbye. Mića’s sincere words soften her and convince her of his love and honest intentions, so Đula agrees to elope with him. Marko and his men catch Sima and accuse him of colluding with the thief. Suddenly, they see Mića hurrying into the skies on Marko’s horse with Đula. Marko realises that he has also been swindled and makes peace with Sima.
Act III
At a village fair Doma decides to leave Marko after they have a fight. Sima tells Marko that he has seen Đula in another village, where she lives on a large estate with Ero the Joker, whose real name is Mića. The couple arrive at the fair in elegant dress, and the village folk welcome them merrily. Marko and Doma are still angry at Mića, so he tells them his story: he is a wealthy landlord who was instructed by his mother to appear before his sweetheart as a poor man. Now that he has Đula forever, he is returning Doma’s money and Marko’s horse. Everyone reconciles and joins in with the singing and dancing.