Section 31 is an autonomous secret organisation which claims to protect the security interests of the United Federation of Planets. Fictionally, it's existed (off-the-record) since the earliest days of Starfleet (they even show up in Star Trek: Enterprise), but in our reality, Section 31 was first invented for Star Trek: Deep Space Nine.
Created by Deep Space Nine executive producer Ira Steven Behr, Section 31 was inspired by a line of dialogue in the episode 'The Maquis, Part II' where Commander Sisko says: "It's easy to be a saint in paradise."
Behr responded, "Why is Earth a paradise in the twenty-fourth century? Well, maybe it's because there's someone watching over it and doing the nasty stuff that no one wants to think about. Of course it's a very complicated issue. Extremely complicated. And those kinds of covert operations usually are wrong!"
For More You Can Check: