The United Federation of Planets, abbreviated as UFP and usually referred to as "the Federation", is a fictional interstellar federal republic composed of planetary sovereignties depicted in the fictional Star Trek science fiction franchise.

Transported image. source
The planetary governments agree to exist semi-autonomously under a single central government based on the Utopian principles of universal liberty, rights, and equality, and to share their knowledge and resources in peaceful cooperation and space exploration - wikipedia
The Federation was first introduced in the 1966–1969 television show Star Trek as the organization that sent the starship USS Enterprise on its mission of peaceful exploration. As the Federation has continued to explore the galaxy and expanded its membership, it is increasingly challenged by hostile alien civilizations such as the Borg and the Dominion. The survival, success, and growth of the Federation and its principles of freedom have become some of the Star Trek franchise's central themes.

Transported image.
source
The Federation was originally conceived as an idealized version of the United Nations and as an analogy to the Cold War. The Federation has been generally well received by critics and fans, becoming one of the most enduring storylines and symbols of the Star Trek franchise.
# See also * Depiction * Reception * See also * References * External links
# Conception
The first mention of the United Federation of Planets was in the 1967 episode "A Taste of Armageddon", although other vague references such as just "the Federation" or to the "United Earth Space Probe Agency" were used in prior episodes - wikipedia
As part of the anti-war message he wanted the show to convey, ''Star Trek'' creator Gene Roddenberry intended to depict the Federation as if it was like an ideal, optimistic version of the United Nations - woodygoulart.com

Federation Council Building exterior, Earth - wikia.com
In several following episodes of the original series that were intended as allegories to the then-current Cold War tensions, the Federation took on the role resembling NATO while the Klingons represented the Soviet Union.
Transported image.
source
Roberto Orci, writer of the 2009 ''Star Trek (Star Trek (film))'' movie, explained that the utopianism of the series has many times been a thematic foil to ongoing world events, showing that peace is possible in times where there are fears of "perpetual war" - nytimes.com
The Federation is described as an interstellar (star system) federal (federalism) polity with, as of the year 2373, more than 150 member planets and thousands of colonies spread across some 8,000,000 cubic light years of the Milky Way galaxy.
The social structure within the Federation is classless (Classless society) and operates within a money-less "New World Economy".
The Federation is described as stressing, at least nominally, the values of universal liberty, equality, justice, peace, and cooperation - gizmodo.com
The Federation also maintains its own quasi-militaristic and scientific exploratory agency, known as Starfleet (also written as "Star Fleet" in some texts).
Starfleet is seen handling many other governmental processes, sometimes with no other agency's influence, such as border defence, diplomatic envoy and has seen extensive use as an offensive military force.