The answer to this question depends heavily on the specific religion and time period you're talking about. However, I can provide some common examples:
* Ancient Egypt: Generally, only priests and pharaohs were allowed into the innermost sanctuaries where the god's statue resided. Common people would pray in outer courtyards or at smaller shrines.
* Ancient Greece: While anyone could visit the outer areas of a temple, only priests or priestesses were allowed into the inner sanctums. In some cases, specific rituals or sacrifices required the presence of designated individuals.
* Ancient Rome: Similar to Greece, priests and priestesses had primary access to the inner sanctums. However, certain rituals might allow for specific groups of laypeople to participate within the temple.
* Judaism: In the ancient Temple in Jerusalem, only priests (specifically, the Kohanim) could enter certain areas, like the Holy Place. The High Priest was the only one allowed to enter the Holy of Holies, and only on Yom Kippur.
* Hinduism: While entry rules may vary depending on the temple, traditionally, Brahmins (the priestly class) have had the primary role in performing rituals and entering the inner sanctums. Laypeople can typically access the temple for prayer, but may not be allowed in the innermost areas.
Therefore, the people who were allowed into temples to pray gods were priests and priestesses, pharaohs, High Priests, Kohanim, and Brahmins.