Fencing originated in ancient Egypt and Rome, where people used short swords and light spears. The sport developed over centuries with the introduction of new weapons like the rapier in the 14th century and epee in the 18th century. Key rules of fencing include gaining the right of way by threatening an opponent, allowing counterattacks after parries, and prohibiting leaving the fencing area to avoid being hit. Women's fencing became an Olympic sport in 1994.