If Eorzean history is to be believed then the 12 should predate the Allagans. Afterall, there have been plenty of other civilization before Allagan came to be its just that they probably advanced so much more than these past civilization.

I may be wrong, but another Kingdom -Meracydia- was able to defend itself against Allagans for a long time. And according to the SMN questline they specialized in summoning but once conquered their summoning (and maybe sealing) arts were assimilated withing Allag.