In ancient times and in some primitive societies, prostitution often had religious connotations—sexual intercourse with temple maidens was an act of worship to the temple deity. In Greece the hetaerae [Gr.,=companions or associates] were often women of high social status, but in Rome the meretrices were on a low social level and were forced to wear wigs and special garments signifying their trade. In the Middle Ages prostitution flourished, and licensed brothels were a source of revenue to municipalities.