Russia continued to alter the Kazakh culture and way of life with new growth and urbanization efforts in the early 1900s. Railroads were built and Russians were encouraged to settle the region as farmers. Relations further deteriorated in 1916 when the Russian tsar decided that the Kazakhs were eligible to fight in the Russian army and began drafting Kazakhs to fight. This led to resistance and even armed uprisings by the people, but they had no chance to defeat the more powerful Russians as many fled east.
With the Russian Revolution, the Kazakhs attempted to create an independent government in 1917 and, due to chaos and disorganization in St. Petersburg, succeeded for two years. By 1920 though the Bolsheviks had essentially solidified their power and they ended this short-lived republic, which was incorporated into the newly founded Soviet Union in 1920.
The Kazakh Autonomous Soviet Socialist Republic (later called the Kazakh Soviet Socialist Republic) was formed in 1925. Kazakhstan suffered greatly under Soviet leadership, most particularly under Josef Stalin's rule, which began in 1929. Under Stalin there were great efforts to collectivize agriculture, which destroyed Kazakh life and led to most food production to be overseen by governmental forces, hence giving the government to control its distribution to ethnic Russians as many of the Kazakh farmers were starved to death. Over the following five years it is estimated that over a million Kazakhs died, many from starvation.
In the late 1930s and during World War II (WWII) Kazakhstan was the recipient of numerous factories and people. First, the Soviet government began exiling rebellious people to the region, making the region as a whole more diverse ethnically, mostly with ethnic Tatars and Muslims from the Caucus region. During WWII these deportations continued as the Soviet feared they might collaborate with the Nazis and others, including numerous Poles were also deported here in fear of their allegiance. Also during WWII, as the Germans entered the Soviet Union's western border, numerous factories were moved east, many of which made their way to Kazakhstan.
Even after WWII movement to Kazakhstan continued as the Soviet government again stressed farm development on Kazakhstan's lands. Also, with the growth of natural resources found in Kazakhstan, industries were moved to the region and by the 1980s the Kazakhs made of a minority in the region.
Soviet rule finally ended with the fall of the Soviet Union in 1991. Despite the wrongs the Soviets did to the Kazakh people, the Kazakh leadership, including Nursultan Nazarbayev sided with the Soviet Union as they didn't know if they could sustain an economy and high standard of living without Russian support. This led to a fairly peaceful transition to an independent state as Kazakhstan was the last of the former Soviet republics to declare independence. This peaceful transition also helped in that nearly have the population was Kazakh and another half Russian. These efforts to maintain the relationship with the Soviet Union and Russia quelled ethnic tensions.
Since independence Kazakhstan has maintained strong relations with Russia, but has also opened its doors to various other countries as they now have positive relations with many of their neighbors and other international powers. Despite this, their government still acts like the Soviet government did in the sense of power being held at the top in a dictator-like fashion.