Outer Space Treaty (1967)
The US, Soviet Union and UK signed a treaty barring nuclear weapons and weapons of mass destruction from Earth orbit and forbidding military bases on the Moon and other celestial bodies. China and Russia are parties today. The text says nothing explicit about conventional weapons mounted on satellites.
It became the foundation of space law and is still cited by every government that tests a space weapon.
The conventional-weapons gap left room for anti-satellite arms to develop without a clear legal ban.
Both the US and China can describe their on-orbit weapons as treaty-compliant, because the treaty never covered them.
