A young officer, Pyotr Grinyov, is posted to a remote fortress on the Orenburg steppe, where he falls in love with the commandant's daughter Masha and runs foul of a rival. When Pugachev's rebellion sweeps over the fortress, an old act of kindness binds the rebel leader and the young nobleman in a dangerous friendship.