Kazakhs migrated into Dzungaria in the 18th century after the Dzungar genocide resulted in the native Buddhist Dzungar Oirat population being massacred.