The origin of the city starts with a fortress built by the Cossacks in order to defend imperial borders and claim Russian ownership over Circassia, which was contested by Ottoman Turkey. In the first half of the 19th century Yekaterinodar grew into a busy center of the Kuban Cossacks. It was granted town status in 1867. By 1888, about 45,000 people lived in the city and it became a vital trade center of southern Russia. In 1897, an obelisk commemorating the two hundred year history of Kuban Cossack Host was built in Yekaterinodar.
During the Russian Civil War the city changed hands several times between the Red Army and Volunteer Army, many Kuban Cossacks were committed anti-Bolsheviks who supported the White Movement. Lavr Kornilov, a White general, captured the city in 10 April 1918, only to be killed a week later when an artillery shell fired by Bolsheviks blew up the farmhouse he was using as his headquarters.
During the World War II, Krasnodar was occupied by the German Army between August 12, 1942 and February 12, 1943. The city sustained heavy damage in the fighting but was rebuilt and renovated after the war.
In the summer of 1943, the Soviets began trials, including of their own citizens, for collusion with the Nazis and participation in war crimes. The first such trial was held at Krasnodar on July 14�17, 1943. The Krasnodar tribunal pronounced eight death sentences, which were summarily conducted in the city square in front of a crowd of about thirty thousand people