Alexander the Great crossed the Swat River with part of his army and, before turning south, subdued the locals at what are now Barikot and Udegram. His successors ceded Swat to the Mauryan dynasty. Under them and the later Kushan empire, Buddhism thrived here and it was probably the birthplace of Vajrayana (Tantric Buddhism), which in the 7th century took root directly in Ladakh and Tibet. Even as Buddhism was declining in the rest of Gandhara it remained Swat’s prevailing religion until the 15th century despite Hindu, and then Muslim, arrivals.
By the 16th century the Yusufzai Pashtuns, driven before the advancing Mughal army of Babur, were the valley’s dominant tribe. With them came missionaries, forcefully converting Kohistanis to Islam.
Swat remained stiffly independent and chafed against British control from the 19th century. Hostilities erupted into open war in 1897 with the Malakand Uprising, in which a young Winston Churchill served as both soldier and cub reporter. In 1926 Swat was granted independent status under a Wali (ruler), and kept Pakistan at partial arm’s length following Partition. The Wali’s sovereignty was finally abolished in 1969 when Swat formally became part of NWFP.