During the Middle Ages the Mossi established several separate kingdoms including those of Tenkodogo, Yatenga, Zandoma, and Ouagadougou. Sometime between 1328 and 1338 Mossi warriors raided Timbuktu but the Mossi were defeated by Sonni Ali of Songhai at the Battle of Kobi in Mali in 1483.