The Basic Principles on the Use of Force and Firearms by Law Enforcement Officials was adopted by the Eight United Nations Congress on the Prevention of Crime and the Treatment of Offenders and was welcomed by the General Assembly of the UN in resolution 45/166 in 1990. As such, it is not legally binding for the Member States, but rather seeks to further clarify aspects of the Code of Conduct for Law Enforcement Officials and provide guidelines that it encourages States to adopt and implement.
Goal: The goal of the Basic Principles is to “…assist Member States in their task of ensuring and promoting the proper role of law enforcement officials…” and to provide more detail concerning Article 3 of the Code of Conduct for Law Enforcement Officials, which handles the use of force by law enforcement officials.
Relevant Clauses 
2. Governments and law enforcement agencies should develop a range of means as broad as possible and equip law enforcement officials with various types of weapons and ammunition that would allow for a differentiated use of force and firearms. These should include the development of non-lethal incapacitating weapons for use in appropriate situations […]
3. The development and deployment of non-lethal incapacitating weapons should be carefully evaluated in order to minimize the risk of endangering uninvolved persons, and the use of such weapons should be carefully controlled.
4. Law enforcement officials, in carrying out their duty, shall, as far as possible, apply non-violent means before resorting to the use of force and firearms. They may use force and firearms only if other means remain ineffective or without any promise of achieving the intended result.
5. Whenever the lawful use of force and firearms is unavoidable, law enforcement officials shall:
a) Exercise restraint in such use and act in proportion to the seriousness of the offence and the legitimate object to be achieved;
b) Minimize damage and injury, and respect and preserve human life;
c) Ensure that assistance and medical aid are rendered to any injured or affected persons at the earliest possible moment;
7. Governments shall ensure that arbitrary or abusive use of force and firearms by law enforcement officials is punished as a criminal offence under their law.
8. Exceptional circumstances such as internal political instability or any other public emergency may not be invoked to justify any departure from these basic principles.
9. Law enforcement officials shall not use firearms against persons except in self-defence or defence of others against the imminent threat of death or serious injury, to prevent the perpetration of a particularly serious crime involving grave threat to life, to arrest a person presenting such a danger and resisting their authority, or to prevent his or her escape, and only when less extreme means are insufficient to achieve these objectives. In any event, intentional lethal use of firearms may only be made when strictly unavoidable in order to protect life.
Policing unlawful assemblies
12. As everyone is allowed to participate in lawful and peaceful assemblies, in accordance with the principles embodied in the Universal Declaration of Human Rights and the International Covenant on Civil and Political Rights, Governments and law enforcement agencies and officials shall recognize that force and firearms may be used only in accordance with principles 13 and 14.
13. In the dispersal of assemblies that are unlawful but non-violent, law enforcement shall avoid the use of force or, where that is not practicable, shall restrict such force to the minimum extent necessary.
14. In the dispersal of violent assemblies, law enforcement officials may use firearms only when less dangerous means are not practicable and only to the minimum extent necessary […]
Policing persons in custody or detention
15. Law enforcement officials, in their relations with persons in custody or detention, shall not use force, except when strictly necessary for the maintenance of security and order within the institutions, or when personal safety is threatened.
16. Law enforcement officials, in their relations with persons in custody or detention, shall not use firearms, except in self-defence or in the defence of others against the immediate threat of death or serious injury, or when strictly necessary to prevent the escape of a person in custody or detention […]
Eighth United Nations Congress on the Prevention of Crime and the Treatment of Offenders (1990). Adopted by the Eighth United Nations Congress on the Prevention of Crime and the Treatment of Offenders. Retrieved October 16, 2013, from United Nations Rule of Law: http://www.unrol.org/files/BASICP~3.PDF