The Land Borders Law will not necessarily change how border security is handled when the measure takes effect on Jan. 1, but it reflects China's growing confidence in its capability to manage its frontiers.
This is the first time that the People's Republic of China, founded 72 years ago, has a dedicated law specifying how it governs and guards its 22,000-km (14,000-mile) land border shared with 14 countries, including former superpower Russia and nuclear-capable North Korea.
The country will "take effective measures to resolutely protect territorial sovereignty and land border security", the law says.
Chinese military and military police - the People's Liberation Army and the People's Armed Police Force - are responsible for guarding the border against any "invasion, encroachment, infiltration, provocation".
The law stipulates that China can close its border if a war or other armed conflict nearby threatens border security.