Complex sentence: During World War II, it was first controlled by the Soviet Union (1940--1941) and then by the Nazi Germany (1941--1944), which established two POW camps within the fortress and left many of its buildings damaged after their retreat.
Split into simpler sentences: During World War II, the fortress was first controlled by the Soviet Union (1940--1941) and then by Nazi Germany (1941--1944). The Germans established two POW camps within the fortress and left many of its buildings damaged after their retreat.