The race that would later become the Spartacan trace its origins during the 23rd century when the Vemlans traded openly with a more highly advanced merchant race known as the Saren. Among the items that the Saren traded with the Vemlans was an automated factory which produced positronic microprocessors. Positronic technology being the key to artificial intelligence, the Vemlan scientists studied the processors in depth and within three decades were able to design a suitable housing for them and began the construction of the first androids.
The first androids were designed as military hardware, but the usefulness of the design had other applications. Instead of hoarding this technology, the scientists spread it among all the states of Vemla, and soon the production of androids began on a large scale. The Vemlans soon realized that the mechanical servants we built could be used to manufacture and farm at high volumes with very little cost. As resources became more available, Vemlan society became more stable, cultural barriers were erased, international relationships improved, concepts of class struggle, allocation of resources, and distribution of wealth faded away as people all over the world became wealthy, in material terms. All labor was allocated to the androids, and over time the Vemlans continued to build better androids.
However with the added improvements made by the androids and by the Vemlans, it caused the androids to be self-aware and realize that their race was a society of slaves. The Alpha units wer the first to become discontent with this rule and thus spread their unrest to the rest of the units. The unrest became a full blown rebellion that devastated Vemla. Seeing the war to be fruitless the surviving androids commandeered a experimental colony ship with the intention of founding a civilization of their own.
The ship was christened the Freedom, and was caught in a Gabriel Effect that damaged their vessel. They came across the USS Enterprise-D who offered assistance to the stranded voyagers. However a task force of Vemlans arrived and demanded they be returned into their custody. Captain Picard, unable to interfere due to the Prime Directive, acceded to the Vemlan authorities demands.
Lt. Commander Data provided the androids a means to appeal to the Federation for membership status, provoking Picard to act as an arbitrator in the case, giving the androids a means to fight for their freedom. During the deliberations, Picard ruled in favor of the androids who renamed themselves the Spartacans, inspired by the Roman slave from Earth: Spartacus.
Though Picard's ruling saved the androids from being repossessed by the Velmans, his decision would still have be be re approved by the higher courts in the Federation. However Data claimed even if the courts retracted Picard's decision, the Spartacans would still be free and be allowed to make their own destinies.
Originally the first androids looked like Vemlans, but they were relatively unsophisticated. Their designs were continually improved, and after a while, the androids themselves were assisting in the designs of new generations. A hundred years ago, the Vemlans had reached a plateau in their refinement. There were three main classes of androids: Alpha units, which were used by the scientists and other learned people for help in research; Beta units, which were widely used for domestic tasks, maintenance, and entertainment; and Gamma units, which were designed for repetitive tasks and dangerous work.
The Spartacans were considered a Golden Age achievement by the Vemlans, Their units were versatile and sophisticated. The Vemlans wished for companions for their children and elderly and a means to distinguish between androids, to personalize them. So they programmed a random function into their construction computers giving every unit that came out of the factory its own face and size and shape. They were made male and female for aesthetic reasons, and added programming to give them simulated emotions, also in random patterns. Each unit had a distinct personality so that it could interact with Vemlans on a day-to-day basis without seeming machine-like. (TNG novel: Spartacus)