Section 31 was a clandestine organization which claimed to protect the security interests of United Earth, and later the United Federation of Planets. Officially-nonexistent, the organization's title came from the original Starfleet Charter, Article 14, Section 31 of which allowed for extraordinary measures to be taken in times of extreme threat. Section 31 was somewhat comparable to the Romulan Tal Shiar or Cardassian Obsidian Order.
Section 31's agents claimed the organization had existed since the beginning of Starfleet in the 22nd century. In the mid-23rd century, they were mentioned in rumors and considered a critical division of Starfleet Intelligence. Section 31 even had their own black Starfleet insignia at this time. By the late-24th century, Section 31's very existence was a deeply buried secret, known only to a handful of people beyond its own membership and believed to be a rogue organization not considered part of the Federation. It was autonomous, having operated for over two centuries with little to no oversight or accountability, free to kill or remove those it deemed a threat to Federation interests at its own discretion with well-placed agents in nearly every level of both the civilian Federation government and Starfleet's command structure, allowing it to carry out operations without risk of being publicly exposed.