From the Western Han dynasty to the mid-Northern Song dynasty (960–1127), the title underwent several changes in its name, before it was finally settled as "Duke Yansheng" in 1005 by Emperor Renzong of the Northern Song dynasty. Kong Zongyuan, a 46th-generation descendant of Confucius, became the first person to hold the title "Duke Yansheng". The dukes enjoyed privileges that other nobles were denied, such as the right to tax their domain in Qufu while being exempt from imperial taxes. Their dukedom had its own judicial system and the legal capacity to mete out capital punishment, although such sentences had to be ratified by the imperial court.