By 221 BC, Qi was the only rival state left. Qin advanced into the heartland of Qi via a southern detour, avoiding direct confrontation with the Qi forces on Qi's western border and arrived at Qi's capital city of Linzi swiftly. The Qi forces were taken by surprise and surrendered without putting up resistance. Following the fall of Qi in 221 BC, China was unified under the rule of Qin. Ying Zheng declared himself "Qin Shi Huang" (meaning "First Emperor of Qin") and founded the Qin Dynasty, becoming the first sovereign ruler of a united China.