During the Spring and Autumn Period, unjust wars where the strong bullied the weak and the large oppressed the small frequently occurred among the feudal states. In the eleventh year of Duke Ai of Lu (484 BCE), the powerful neighboring State of Qi dispatched troops to attack Lu. Confucius's disciple Ran Qiu (a military commander serving the Ji family) led the left army for the Ji clan and fought against the Qi army at Qingyi (located in present-day Dong'e, Shandong), achieving a great victory. Ji Kangzi asked Ran Qiu how he had learned to conduct warfare, and Ran Qiu replied that he had studied military preparedness and tactics under Confucius. Ji Kangzi then sent an envoy with generous gifts to welcome Confucius back to Lu. Thus ended Confucius's fourteen-year journey through various states.
After Confucius returned to Lu, his learning and moral character, enhanced by over a decade of experience abroad, combined with Ji's invitation accompanied by gifts (币召), elevated his prestige among both the court and the public. At this time, although Duke Ai of Lu was the nominal ruler, real power lay in the hands of Ji Kangzi, leaving the duke sidelined. Many of Duke Ai's decrees failed to win the people's allegiance. Knowing that Confucius advocated "the ruler employs his ministers with Li (Propriety), and ministers serve their ruler with Zhong (Loyalty/Devotion)," the duke frequently consulted Confucius on political matters and various perplexing social issues.
