The society in traditional China was patriarchal. A man played a dominant role in society; women played the role of mother and wife. The legal status of women in the Tang, Ming and Qing dynasties was determined on the basis of legislative codes. The legal status of a woman depended on her origin, social status, and her role in the family. Over the course of life, the status of women changed. During the Tang Dynasty, the position of women in society was significantly higher than in previous and subsequent dynasties. This was facilitated by the spread of Buddhism. Under the Ming Dynasty, there was a significant deterioration in the status of women. This was due to the spread of neo-Confucian principles in society. The regress in the position of a woman in society continued until the end of the Qing dynasty.