Karaj is the capital of Alborz Province, Iran, and effectively a suburb of Tehran. Although the county hosts a population around 1.97 million, as recorded in the 2016 census, most of the 1,419 sqkm county is rugged mountain, the urban area is the fourth-largest in Iran, after Tehran, Mashhad, and Isfahan. The counties of Eshtehard and Fardis were split off from Karaj county since the previous census. The earliest records of Karaj date back to 30th century BC. The city was developed under the rule of the Safavid and Qajar dynasties, and is home to historical buildings and memorials from those eras. Until the second half of the 20th century, it used to be known mainly as a summer resort. Today, it is a major industrial city, with factories producing sugar, textiles, wire, and alcohol.