Article 14, Section 31 of the original Starfleet Charter allows for extraordinary measures to be taken in times where one is exposed to an extreme threat. A cadre of Officials first coming from Starfleet Security took this as the instrument of authority by which they would set-up a clandestine agency: to protect humanity from all manner of threats existing and developing. Spreading its influence quickly it managed to infiltrate or otherwise position itself within the apparatus of human Government and took the job of ensuring the safety and security of humanity.
The Vulcans were unable to confirm the existence of the group but noticed enough discrepencies during an extended period of observation to conclude it reasonable that a 'human conspiracy to unknown goals' existed within the human Government. The Vulcan Advisory Council member responsible for pursuing the matter officially reviewed the findings and concluded no such conspiracy existed. Secretly however his Vulcan Councilor was able to set-up an operation that confirmed the existence of clandestine Security Agency within Starfleet and then send a message expressing interest in cooperation with it. This Vulcan belonged to an ideologically similar group of conspirators within Vulcan High Command and was able to establish links with its 'younger' human counterpart.
Section 31 was subsequently introduced to a network of like above top secret Government Agencies and essentially criminal interest groups that were sometimes aligned. Direct enemies of the network included the Orion Syndicate (though some elements of the Syndicate worked with them from time to time) and the constant threat of being exposed or Governments even having an inkling of such a group were also guarded against.
Using the provision within Section 31, Operatives may enlist the help of Starfleet officers for covert duties. They have significant financial resources and 'material means of incentive' which they use where authority, duty and patriotism may not work. They work closely with a Vulcan cabal though that group is more focused on its own internal security and the belief that High Command has been corrupted by an unknown party. Section 31 also has ties with a Mazarite and Denobulan equivalent through the Vulcans.