In the early 13th century, the Khwarazmian dynasty was governed by Shah Ala ad-Din Muhammad. Genghis Khan saw the potential advantage in Khwarazmia as a commercial trading partner using the Silk Road, and he initially sent a 500-man caravan to establish official trade ties with the empire. However, Inalchuq, the governor of the Khwarazmian city of Otrar, attacked the caravan, claiming that the caravan contained spies and therefore was a conspiracy against Khwarazmia. The situation became further complicated because the governor later refused to make repayments for the looting of the caravans and hand over the perpetrators. Genghis Khan then sent a second group of three ambassadors (two Mongols and a Muslim) to meet the Shah himself, instead of the governor Inalchuq. The Shah had all the men shaved and the Muslim beheaded and sent his head back with the two remaining ambassadors. Outraged, Genghis Khan planned one of his largest invasion campaigns by organizing together around 100,000 Soldiers (10 tumens), his most capable generals and some of his sons. He left a commander and number of troops in China, designated his successors to be his family members and likely appointed Ögedei to be his immediate successor and then went out to Khwarazmia.