Security
Starfleet Security was a branch of Starfleet responsible for maintaining security.
In the early 2150s, Starfleet Security was a section of United Earth's Starfleet that had at least one branch based on Earth in the Sol sector.
Harris served in Starfleet Security until 2149, when his service abruptly ended. (ENT: "Divergence") In 2154, Commander Collins was a security officer who worked for Starfleet Security. The department scanned for DNA and ionization traces to search for Doctor Phlox, who had been kidnapped outside Madame Chang's Mandarin Cafe in San Francisco on Earth. (ENT: "Affliction")
Their assignment patch clearly states "Security Division, Sol Sector", indicating that they have jurisdiction over the entire Solar System. Following the foundation of the United Federation of Planets, Starfleet Security was not only responsible for Starfleet security, but also some Federation outposts, starships, and facilities. In this function, they act in ways analogous to local and regional police agencies, but Starfleet Security's mandate extends much farther than that. The agency is responsible for maintaining and enforcing Starfleet Security regulations, procedures and policies on all Starfleet and affiliated facilities, outposts, and vessels. In addition, this agency is responsible for security clearances of all Starfleet/UFP personnel.
The agency, in close cooperation with Starfleet Intelligence, is responsible for counter-intelligence operations. The agency is also responsible for the security of the Federation President, as well as members of the Federation Council and visiting alien dignitaries.
It is uncertain what relationship exists (if any) between Starfleet Security and the secretive and unofficial Federation agency Section 31 based on the comment by Commander Riker in ENT: "These Are the Voyages...". In 2367, Vice Admiral Thomas Henry was the Chief of Starfleet Security. He evidently was a firm defender of personal liberty in addition to his primary duties when he punished Admiral Norah Satie for leading a baseless political witch-hunt on the Enterprise. (TNG: "The Drumhead") By 2370, Admiral Raner was serving as head of Starfleet Security. (TNG: "The Pegasus")
In 2369, the Starfleet Security officer George Primmin was sent to Deep Space 9 to help protect a shipment of deuridium. (DS9: "The Passenger")
Starfleet Security often sent Odo criminal activity reports. (DS9: "Heart of Stone")
A Starfleet Security investigation determined that Ambassador Krajensky had been kidnapped or killed by the Dominion on his way to Risa. (DS9: "The Adversary")
After Benjamin Sisko was attacked by a member of the Cult of the Pah-wraiths in early 2375, he gave a statement to Starfleet Security. (DS9: "Image in the Sand")
Aboard Starfleet-run facilities and vessels, security was one of the most important divisions in the 23rd and 24th centuries, combining the armory and MACO functions of the 22nd century. Security personnel served functions both defensive and offensive, ranging from security patrols on board a starship, to guarding prisoners, to firing the ship's weapons, to providing protection during landing party/away team missions, and more. In the 24th century the officer in charge of security on a starship was given the title of Security Chief.