During the 1580s, many Yusufzais and Mandanrs rebelled against the Mughals and joined the Roshani movement of Pir Roshan. In late 1585, Mughal Emperor Akbar sent military forces under Zain Khan Koka and Birbal to crush the Roshani rebellion. In February 1586, about 8,000 Mughal soldiers, including Birbal, were killed near the Karakar Pass between Buner and Swat while fighting against the Yusufzai lashkar led by Kalu Khan. This was the greatest disaster faced by the Mughal army during Akbar's reign. However, during the attack, Pir Roshan was himself killed by the Mughal army near Topi. In 1987, Mughal general Man Singh I defeated 20,000 strong Roshani soldiers and 5,000 horsemen. Pir Roshan's five sons, however, continued fighting against the Mughals until about 1640.