The kingdom of Dahomey formed from a mixture of ethnic groups on the Abomey plain. Historians theorized that the insecurity caused by slave trading may have contributed to mass migrations of groups to modern day Abomey, including some Aja, a Gbe people who are believed to have founded the city. Those Aja living in Abomey mingled with the local Fon, also a Gbe people, creating a new ethnic group known as "Dahomey". The Gbe peoples are said to be descendents of a number of migrants from Oyo. Gangnihessou, (a member of an Aja dynasty that in the 16th century along with the Aja populace had come from Tado before settling and ruling separately in what is now Abomey, Allada, and Porto Novo), became the first ruler of the Dahomey Kingdom. Dahomey had a military culture aimed at securing and eventually expanding the borders of the small kingdom with its capital at modern day Abomey.