Chivalry was a code of conduct for knights during the Middle Ages. It required knights to defend the church, protect the weak, especially women, be brave in battle against enemies of the church, carry out their feudal duties loyally unless contrary to God's laws, and champion righteousness. Chivalry grew popular during the 12th-13th centuries but declined later in the Middle Ages as knighthood became more of a courtly service. The Crusades helped spread chivalric ideals by presenting crusaders as model knights, though literature later reacted against chivalry's excesses.