[2] The Cossacks is believed to be somewhat autobiographical, partially based on Tolstoy's experiences in the Caucasus during the last stages of the Caucasian War.
The young idealist Dmitry Andreich Olenin leaves Moscow, hoping to start a new life in the Caucasus.
He tries to stop this emotion and eventually convinces himself that he loves both Luka and Maryanka for their simplicity and decides that happiness can only come to a man who constantly gives to others with no thought of self-gratification.
He first gives an extra horse to Luka, who accepts the present yet doesn't trust Olenin on his motives.
As time goes on, however, though he gains the respect of the local villagers, another Russian named Beletsky, who is still attached to the ways of Moscow, comes and partially corrupts Olenin's ideals and convinces him through his actions to attempt to win Maryanka's love.
Olenin spends the night with Eroshka but soon decides that he will not give up on the girl and attempts to win her heart again.
As Luka seems to be dying and is being cared for by village people, Olenin approaches Maryanka to ask her to marry him; she angrily refuses.