 The prolific temple construction was not entirely for religious reasons.Temples acted as local courts or as surrogate courts, especially when built from royal endowments.They were seen as palaces and the rituals marking the daily routine of the deity imitated those of the king.