Law in Star Trek refers to the legal procedures and processes as seen in the Star Trek fictional universe. In several TV episodes and films since its inception in the 1960s, Star Trek has used fictional legal constraints and consequences as a plot device both as a parable for contemporary society in the real world, and to explore the society and politics of the future.
A discussion of this subject by Paul Joseph and Sharon Carton in the University of Toledo Law Review examines how this fictional set of laws deals with controversial issues in American law, such as the right to life and privacy, as well as the law's response to sexual orientation. The details and application of these laws, and the ways in which these reflect real-world legal systems, are further examined in the Adventures in Law and Justice: Exploring big legal questions in everyday life by Bryan Horrigan and Star Trek Visions of Law and Justice edited by Robert Chaires and Bradley Chilton. The former discusses the possibility of applying a comparison between law and a part of popular culture to the teaching of national and international law.
In Star Trek, the Federation is depicted as a utopian interplanetary federal republic stressing the importance of sentient rights, respect for life, and non-aggression. A legislative, judiciary, and executive branch are present. The Prime Directive, a controversial guiding principle of the Federation, states that there should be no interference with the development of any pre-warp alien civilization; the only known higher law in the Federation (according to canon) is the highly classified 'Omega Directive', which directs captains to seek out and destroy the extremely dangerous 'omega particles' and effectively 'rescinds' the Prime Directive in cases where the 'Omega Directive' applies.