The Outer Space Treaty was signed to prevent the use of nuclear weapons being utilized in space.
Source