David is preparing a song for the midsummer festival. Then Walther arrives and tells Hans that a song came to him in a dream. Hans helps him to prepare the song for the contest. When they have left the workshop Beckmesser comes in and sees the piece of paper with the song. He picks it up when Hans returns and says that it is obvious that he, Hans, wants to enter the contest. Hans tells Beckmesser that he can have the song. Beckmesser is delighted and thinks he can now win Eva in marriage.