the valley was first settled by merinians about five hundred years before cc starts. merinian society was at that point fairly stable, but had no reach past the mountains. society along the coast was actually developed to the point of exploring and expanding up almost to kelinam, and while the almerans towards the south end of the coast took to the sea sooner, the merinians headed inland towards the mountains. (merinians had sea travel but did not tend to go far from the coast - it was mostly for trade, with a few exceptions of independent explorers.)
so they moved inland which meant crossing the mountains - the first group from the coast to do so. (the kelim actually already had society beyond the mountain range, but they never crossed the mountains, they went around them.)
the valley is actually a very fertile chunk of land in the midst of a harsh terrain. the soil is rich and full of minerals, and the main river has a wide flood-plane which makes a lot of the land good for farming. it's also well forested, particularly farther from the river, and so there's a lot of resources to be had there. hence, it became settled.
the merinian valley settlements spread out across the valley and began to farm there; it was an attractive place to settle not only because of the material wealth, but also because within two to three generations natural magic affinity appeared in those whose settler ancestors had not had any, and became clearly stronger in families which already tended towards a natural affinity.
they traded with merin, however there was no official merinian government in the valley, and the settlements were more or less independent from each other as well as the home country. (the merinians, unlike the almerans, were not an imperial people, and were more interested in setting up trade than in making colonies; they did continue across the mountains and set up the first trade route through the valley, to the calyssians and eyrinese in the west)
the valley was briefly known as 'west merin' or 'upper merin' on the coast, but was never officially under merinian rule despite being settled mostly by its people. in fact it was under no collective government at all, but rather run by local peacekeepers and town officials. this would not change until the bakran conquest almost a hundred and twenty years later.
the bakra were the people on the other side of the eyrin sea, who around the edges of the continent and began to take over land between the sea and the mountains. they drove through calyssus in the south, seizing land and displacing many of the calyssian people; in the north they cut through the kelinam territories and pushed out most of the kelim. rather than go around the mountains to the north to get to the coast, they pushed through eyrin and used the merinian trade route.
kelim, calyssian, and eyrinese refugees fled through the trade pass ahead of the bakra, and reached the valley. as they came into the merinian settlements there, news spread, and people began to organize. because of the way the valley is structured, by working together they are able to hold the pass for long enough to send for help from merin, which allows them to hold the valley.
(the bakran conquest is actually stopped largely by kelinam; when they cannot cross the mountains they attempt to go around, but are stopped by kelim military forces. the bakran war is fought largely west of the mountains, by mostly eyrin forces.)
after the failed bakran invasion of the valley, things shift extremely dynamically for a while - four ethnic groups now have a major presence in the valley, the population has more than doubled, and despite having unified to stop the bakra it had very little solid organization.
the organization that eventually emerges is that the family with the most power, descended from some of the earliest settlers of the valley, become the ruling family. they are the most strongly connected to the magic in the valley, and many of their close relatives were key in holding the valley against the bakra. their family becomes the rulers, later royal family. the first ruler, who with her husband's help organized the force that initially held the pass, sets up the positions of north and south governance, appointing her younger two children to them while keeping her eldest son as heir to her own title
naturally this results in a three-way split among the family, with the eldest son eventually marrying another powerful sorceri, while the younger son and the daughter marry less powerful sorceri. the council formation came later, and the north and south councils were created, composed of non-sorcerers selected by the region's rulers.