The Mongol conquest of Khwarezmia, or the Mongol invasion of Iran (Persia) (Persian: حمله مغول به ایران‎), from 1219 to 1221 marked the beginning of the Mongol conquest of Central Asia. According to the Persian historian Minhaj-i-Siraj, Genghis Khan sent the ruler of the Khwarazmian Empire, Muhammad II, a message seeking trade and greeted him as his neighbor: "I am master of the lands of the rising sun while you rule those of the setting sun. Let us conclude a firm treaty of friendship and peace", or he said "I am Khan of the lands of the rising sun while you are sultan of those of the setting sun: Let us conclude a firm agreement of friendship and peace." The Mongols' original unification of all "people in felt tents", unifying the nomadic tribes in Mongolia and then the Turkomans and other nomadic peoples, had come with relatively little bloodshed, and almost no material loss. The Mongol wars with the Jurchens was known to Muhammad II and he agreed to this peace treaty. Conflict between the Mongols and the Khwarazmian Empire started less than a year later, when a Mongol caravan and its envoys were massacred in the Khwarazmian city of Otrar. In the ensuing conflict, lasting less than two years, the Khwarazmian dynasty was destroyed and its territory was conquered. 1218년 서요를 공략한 칭기즈칸은 당시 서역의 강국인 호라즘(Khwarezm: 카와리즘)제국에 3명의 사절과 함께 450명의 무슬림 대상(隊商)을 파견, 몽골과의 정식적인 관계 수립과 무역을 통한 교류를 시도하려고 했다. 그런데 사절단이 호라즘의 영토인 오트라르에 이르렀을 때, 그 지역을 관장하던 지사가 그들을 몽골에서 보낸 간첩으로 오인(誤認)하여 재물을 빼앗고 인명을 살상하거나 감옥에 가두었다. 이때 단 한 명의 낙타몰이꾼이 감옥에서 탈출하여 칭기즈칸에게 달려와 그 실상을 보고했다. 칭기즈칸은 처음에 무슬림과의 두터운 신뢰를 쌓기 위하여 관용을 베풀고자 하였다. 그래서 호라즘의 군주 샤 무함마드 2세(알라웃 딘 무함마드)에게 사자를 보내 사건을 일으킨 당사자를 처형하라고 요구했다. 사건 당사자는 샤의 외삼촌이었기에 칭기즈칸의 요구는 거절당했다. 그뿐만 아니라 샤는 몽골제국을 먼 땅의 야만족으로 여겨 사자 1명을 처형하고 2명은 수염을 깎아 모욕을 준 후 추방하였다. 이에 분개한 칭기즈칸은 쿠릴타이를 소집해 부족 원로·수장(首長)들의 의견을 조율한 후 즉각 서역 원정에 나서기로 했다. 1219년 봄에 그는 제1차 서역 원정을 단행하였다. 그는 아들 4형제 중 가장 사랑하는 아들 4남 툴루이와 함께 주력군을 이끌고 호라즘제국의 중심 도시인 부하라와 사마르칸트로 출진하였다. 이때 2남 차가타이와 3남 오고타이는 오트라르를 점령해 사건의 당사자인 지사를 처형하였다. 장남 주치는 시르다리야강 하류를 따라 서진하면서 호라즘의 영향권 내에 있는 도시들을 공략하였다. 이처럼 전방위적으로 공략을 당한 호라즘제국의 군주 샤는 1220년 말 카스피해 쪽으로 도망갔다가 끝내 그곳에서 사망하였다. 그의 아들 잘랄룻 딘은 계속 항전(抗戰)하며 게릴라전을 펼쳤으나, 결국 1231년 소아시아에서 한 쿠르드인에게 암살당했다. 이때 칭기즈칸은 힌두쿠시산맥과 사마르칸트를 오가면서 인도로부터 남러시아에 이르는 광활한 지역에서 몽골 서정군을 총지휘했다.