Odessa or Odesa is the fifth largest city in Ukraine. The predecessor of Odessa, a small Tatar settlement, was founded by Hacı I Giray, the Khan of Crimea, in 1240 and originally named after him as "Hacıbey". After a period of Lithuanian control, it passed into the domain of the Ottoman Sultan in 1529 and remained in Ottoman hands until the Ottoman Empire's defeat in the Russo-Turkish War of 1792.