Sigma Iotia II

Planet of gangsters

A planet whose people built their society around a book about 1920s Chicago gangsters left behind by a Federation ship.

Sigma Iotia II is home to the Iotians, an intelligent and highly imitative people. A century before A Piece of the Action, the USS Horizon visited the planet, before the Federation's non-interference directive, and left behind several books, among them Chicago Mobs of the Twenties.
The Iotians modeled their entire society on it, dividing the planet into territories run by rival bosses with fedoras, tommy guns and protection rackets. Kirk, Spock and McCoy land to see what happened and Kirk eventually unites the bosses, though McCoy accidentally leaves his communicator behind, giving the Iotians a new technology to copy.