Back in the 11th century, dwarves and gnomes of Mahakam went up to higher mountain levels, barricaded themselves in impenetrable fortresses and shut the pass. They suspected humans, massacring elves or worse-defended werebbubbs, might afterward want to come for them.
The problem was they couldn't produce enough food in such heights, all the more since halflings who lived in Mahakam stayed in its valleys. This meant they'd eventually have to make a deal with humans.
The war's course
Inheriting stable Temeria from his father Adalbert of Maribor, Lambert was an energetic ruler who sought to expand his influence in varied ways. Taking 11-years he somehow made clan elders of Mahakam recognize him as the ruler and pay him homage, rendering him the first de jure human king of this state.
This remained convenient for both sides. In time, Mahakamans learned how to move on and profit from human-dominated markets of the Continent and humans happily began to use the superb weapons gnomes and dwarves make. By 1267, Mahakam became so established they can no longer be threatened by Nordlings or Nilfgaardians as they'd flood mines, halt the production of desired weapons and move.