The Dynasty of Primes was the first seven Primes in Cybertronian history. They were on a quest to harvest energon using the Star Harvester. In some documents of history, they were loosely known as "The Thirteen".
According to Jetfire, the Dynasty of Primes was formed by the first Thirteen Cybertronians. These beings could not transform, but they and their transforming descendants possessed powers beyond that of the average Cybertronian. The Dynasty ruled Cybertron and protected the AllSpark, replenishing it with the energy harvested from stars. However, the Dynasty of Primes was also benevolent, believing that all life was sacred, and refused to harvest stars with worlds inhabited by sentient races. To better prevent abuse, the Dynasty guarded the Matrix of Leadership, an artifact formed by the AllSpark to power the Great Machines used to harvest stars. However, one of these Primes believed that they should harvest the star Sol, which promised to yield vast amounts of energy, even though Sol was orbited by a small world with primitive inhabitants, humans. After this plan was unanimously rejected by the others, this Prime betrayed and killed most of his brothers, but one survived and hid the Matrix in the Tomb of the Primes on Earth, fusing it shut with his own life essence. The Fallen, as the renegade Prime was now known, dispatched the Seekers to retrieve the Matrix, but they were unsuccessful and eventually abandoned. On Cybertron, the Fallen hunted down and killed every last Prime he could find, knowing that they were a threat to him. A single orphan was hidden away with no knowledge of his lineage: Optimus Prime.
In time, The Fallen encountered Megatron, and directed him to form the Decepticons, promising him the powers of a Prime in exchange for his loyalty. When Megatron left Optimus Prime in stasis lock, the last threat to the Fallen was removed, and he prepared for his return to Earth. However, Sam Witwicky, using the knowledge of the AllSpark within his mind, found the Matrix in Petra, Jordan. Unfortunately, it had turned to dust in the millennia in the tomb. When his heart stopped after an attack by Megatron, Sam communed with the sparks of the Twelve original Primes, who had judged Sam worthy of stewardship of the Matrix, and instructed him to merge the Matrix with Optimus. The Dynasty then returned Sam to life and transferred the knowledge of the AllSpark into the restored Matrix. With the Matrix restored, Sam used it to revive Optimus Prime and give him the knowledge of his ancestors. Unfortunately, the Fallen then attacked and stole the Matrix, activating the harvester.
Using parts donated by a critically injured Jetfire, Optimus went to the star harvester, recovered the Matrix, and confronted the Fallen. In the battle that followed, Optimus proclaimed that the Fallen had forfeited his right to be a Prime when he slaughtered his brothers, and told Megatron that Primes were born, not made. Realizing he had been betrayed, Megatron and Starscream abandoned the Fallen and used the space bridge he had created to escape. Optimus then impaled the Fallen through the head with his own spear. With the death of The Fallen, Optimus Prime became sole inheritor of the Matrix and the last of the Dynasty of Primes.