During World War II, on January 19, 1945, Ragnit was captured without a fight by the 3rd Belorussian Front of the Red Army in the course of the East Prussian Offensive. Much of the town was destroyed in the fighting, including the castle, which remains ruined. In accordance to the 1945 Potsdam Agreement, the town became a part of Kaliningrad Oblast of the Russian SFSR. It was renamed to Neman in 1946. Most of the local inhabitants who had not fled during the Soviet conquest of East Prussia were subsequently expelled to the western parts of Germany.