Shanxi province lies to the west of Hebei and has defended Beijing throughout history.The Great Wall of the Ming Dynasty(1368-1644) was built to keep out the remnants of the northern Mongol Yuan forces, and was aligned with nine border garrison towns, two of which are in present-day Shanxi province -- the Garrison of Taiyuan (not located in present-day Taiyuan, but Ningwu county, Xinzhou) and Garrison of Datong.
Even in the modern era, the strategic importance of Shanxi has remained. In 1937 alone, as part of the War of Resistance Against Japanese Aggression (1931-45) and World War II, numerous battles took place between the Japanese army and the Chinese National Revolutionary Army at several Great Wall passes in Shanxi, such as Yanmen Pass, Pingxing Pass and Niangzi Pass.
Datong is strategically located at the critical point of the natural boundary between the farming areas of inner Shanxi and the nomadic areas of the north. Many Great Wall sites from multiple dynasties are located within this city. The Datong Great Wall consists of both an inner and an outer layer, with a total length of 503 kilometers, of which the Shoukou Fortress, Zhenbian Fortress, Desheng Fortress and Xinping Fortress are all well preserved and worth visiting.
Yanmen Pass, or Yanmenguan, located in Xinzhou, Shanxi province, is a famed mountain pass along the Great Wall . The name literally means the gate which wild geese fly over, as this is where they always pass on their annual migration route.
The area has always been a strategic choke point throughout Chinese history, as it controls access between the valleys of central Shanxi and the Eurasian Steppe.This area therefore witnessed various crucial battles from ancient times up until World War II. In 1937, during the war between Japan and China, the Eighth Route Army of China ambushed a Japanese convoy here, destroying more than 400 vehicles. The area around the gatehouses and this stretch of the Great Wall is now a top-rated tourist attraction in China.