The United Federation of Planets is a rapidly expanding organization seeking new members to sign up. Over the course of events, the UFP makes friendly contact with a number of other factions seen once, such as the First Federation, the Thasians, etc; tested numerous times by superior entities and civilizations, the UFP continues to pass muster. The U.S.S. Enterprise is operated by the United Earth Space Probe Agency, apparently the Earth division of Starfleet. The various members of the UFP have a great deal of political independence, and maintain diplomatic relations individually within and without the Federation.
The Klingon Empire is also in expansion within the same area as the Federation, leading to close competition.
One hundred years prior to TOS, a war between Earth and Romulus was waged without any direct contact, using "primitive atomic weapons." The Romulans have been penned inside the Neutral Zone, ringed by an array of stations that have been maintained ever since. The UFP has, since this time, adopted a policy of noninterference in primitive cultures - primitive meaning non warp capable; in recent years, tensions have mounted with the Klingon Empire. Meanwhile, Eminar and Vendikar have been at war for the past five centuries, not stirring from their home system.
The Romulans make their first move since the war, destroying several perimeter stations with a small but shockingly advanced warship. The Gorn and the United Federation of Planets have a border dispute over Cestus III. This is resolved in favor of the UFP by a third party, the Metrons. The war between Eminar and Vendikar was brought to a close through interference by the UFP. Late 20th century "supermen" are settled on Alpha Ceti V by the UFP. The Organians avert a breakout of war between the UFP and the Klingon Empire. Relations remain tense, however.
Tensions between the UFP and the Klingon Empire continue to dispute which one may have the rights to exploit or settle various planets, both uninhabited and inhabited by primitive cultures. The Orions maintained a position of neutrality throughout this, although this was placed into jeopardy after the Babel Conference. The UFP continued to admit new members at a fair clip, trying very hard to position themselves ahead of the Klingon Empire.
Violation of the Neutral Zone by Captain Kirk triggered increased hostility by the Romulan Star Empire, which had continued to militarize with its small warbirds.
Less than two years after the Organians established peace between Empire and Federation, quiet hostilities began to break out again between the Federation and Klingon Empire, which had been generally failing to outstrip the Federation's growth under the restrictive terms of the treaty. Turning to the Romulans, they traded battlecruisers for technology, presumably including cloaking devices.
The Romulans benefitted greatly from this trade; battlecruisers have antimatter as well as fusion engines, are substantially larger than Romulan ships of the era, and better constructed. Continued Federation incursions into the Neutral Zone faced remarkably stiff opposition from locally superior forces. The Tholian Assembly continued its relatively hostile isolationist stance towards the Federation