Varanasi is one of the oldest continuously inhabited cities in the world. Its early history is that of the first Aryan settlement in the middle Ganges valley. By the 2nd millennium BCE, Varanasi was a seat of Aryan religion and philosophy and was also a commercial and industrial centre famous for its muslin and silk fabrics, perfumes, ivory works, and sculpture. Varanasi was the capital of the kingdom of Kashi during the time of the Buddha (6th century BCE), who gave his first sermon nearby at Sarnath. The city remained a centre of religious, educational, and artistic activities as attested by the celebrated Chinese Buddhist pilgrim Xuanzang, who visited it in about 635 CE and said that the city extended for about 3 miles (5 km) along the western bank of the Ganges.