The baojia system was an invention of Wang Anshi of the Northern Song dynasty, who created this community-based system of law enforcement and civil control that was included in his large reform of Chinese government from 1069–1076.