Islamic Interpretation of Dreams (Ibn-i Sirin):

(arb.

The person who leads prayers in a mosque; Guide; Leader; Ruler) If one sees himself building a prison in a dream, it means that he will meet a righteous man or an Imam who will guide him on the straight path.

An Imam in a dream also represents the spiritual leader of all Muslims.

(Also see Five times prayers; Pharaoh)