The Principality of Herat (Persian: شاهزادهنشین هرات), the Emirate of Herat (Persian: امارت هرات), the Herat Khanate (Persian: خانات هرات) or simply Herat (Persian: هرات) was a state in Afghanistan from 1793 to 1863, and one of the 3 main khanates in 19th century Afghanistan (the others being the Khanates of Kabul and Qandahar). The weakening of the principality allowed the Barakzais to intervene and besiege Herat. Ultimately they were able to capture the city on May 27, 1863, ending Herat's existence as an independent state.