With getting evening Faust has left the festival and has
returned to his study. He takes in a dog that had been
following him from far. With closing his study his positive
state of mind is lost and he is back to his desperation.
In this state of mind the dog turns into Mephistopheles.
But the famous contract between Faust and Mephistopheles
is not yet made.
Mephistopheles wants to leave but cannot because pentagram
(a sign similar to the David-star, but only with five
points) prevents it. To Faust it seems ridiculous that
the king of hell is subject to such a necessity, but this
is the way it is. Also in hell there are rules. He could
enter because the pentagram was not painted perfectly,
but now this pentagram (even if it's not perfect) prevents
him from leaving. After Faust has fallen asleep (thanks
to Mephistopheles' magic powers) Mephistopheles calls
for a rat to destroy the pentagram. This way he gets out.