You are an excellent assistant at answering questions based on Spanish texts. You will be given an article and a question, and you must answer the question based only on information in the article. The response should be extracted from the context verbatim.

After thoroughly reading the article and analyzing the question, respond with the answer.

Title:
Genghis_Khan

Context:
The Mongols' conquest, even by their own standards, was brutal. After the capital Samarkand fell, the capital was moved to Bukhara by the remaining men, while Genghis Khan ordered two of his generals and their forces to completely destroy the remnants of the Khwarezmid Empire, including not only royal buildings, but entire towns, populations, and even vast swaths of farmland. According to legend, Genghis Khan even went so far as to divert a river through the Khwarezmid emperor's birthplace, erasing it from the map.[citation needed]

Question:
What was the capital of Khwarezmia before the Mongol invasion?

Samarkand