During World War II, Yelnya was a place of several important battles. On 30 August 1941, it became the place of the Yelnya Offensive, the first successful offensive operation of Soviet troops in the Great Patriotic War, although they suffered heavy losses taking the town. In 1942, Yelninsky District became a part of the so-called "Dorogobuzh Partisan Krai". The German garrison in the town was not able to control the rural territories which were effectively under the partisan control. In March 1942, partisans even liberated the town, killing more than a thousand German troops, but in three days on March 18, 1942 they were forced to retreat back to the forests.