Esfarayen (Persian: اسفراین, also Romanized as Esfarāyen; formerly, Meyanābād, Mīānābād, and Mīyānābād) is a city in and the capital of Esfarayen County, North Khorasan Province in Iran. At the 2006 census its population was 51,321, in 13,376 families.