The Iron Flag is a country with a slightly unusual history. Its founder, Adelwin Stranger, was a younger son of a noble family in a city-state of middle importance, in a realm made up largely of scattered such states. As such, his desire to be a scholar was not upsetting to his family. After his years of compulsory military service, during which his city's army spent most of its time in the field supporting the campaign of a larger, more important city, he left the area entirely to study in the scholariums of Liannis, the power of the time.
A decade and a half later found him in a scholar's retreat nestled in a valley in the foothills of the Iron Spine, the backwater of Liannis, happily ignoring the world in favor of studying anything and everything he could get his hands on. A lot of this, given the proclivities of the libraries there, ended up being magical theory, and several advances in Formulaic magic came from Stranger's notebooks. The practical work for these happened through his friends, however, as Stranger had no ability in his own right. He never complained, seeing magic as just another tool in his studies, and one he never lacked for access to. The retreat also gave him access to everything he was used to as a noble scion; no high, cold monastery this, but a sweet warm valley with orchards and space for horse and hound.
And then, early one year just after Adelwin Stranger became the dean of the retreat, the stories starting filtering in of book-burning, of scholars being killed for protecting their 'heretical' works, and of mages being chased out of the country. Stranger was furious, and sent several of his closest friends out to find out what was happening. They came back soon enough, bringing what works they could salvage with them. He was disgusted at how little there was left to save; and horrified at tales of the grand library in dusty shambles, the once-proud cliffside boarded shut and locked up.
When the inquisitorial teams showed up at his door with axes and torches, and orders for all mages to leave the country immediately, the scholar snapped. The priest-captain sent to manage him hardly knew what to do. Expecting as he was yet another quiet, astonished scholar to step aside and let him work, and instead faced with a man dressed in the rich velvets of a nobleman, spitting in rage. The soldier, basically just a bully who had never fought a war, died just as astonished; on his own sword, his bully's demeanor no match even for Stranger's rusty skill-at-arms. His men were no better. It wouldn't have mattered if they were anyway, as Strangers' magely friends followed his example. The rest of the soldiers died without even drawing weapons.
There followed a string of highly improbable events as Stranger rose to power. This first war of the Flag wasn't much of a war; Stranger had never risen very high in the armies of his home city, but among the scholars in his retreat were several men who had made an in-depth study of warfare; and of course he had most of the mages left in the kingdom, with most of the others more likely to side with him than the inquisitors.
However, what he didn't have was the support of the brainwashed populace. So he went back to his family and, with the support of his older brother on the council, hired the armies of his birth city and several of its neighbors. History refuses to divulge what he paid, but he was never poor.
With these armies he easily overthrew the church, whose army was never much suited to anything besides internal use. The peoples of the capital and Liannis' core cities were happy enough to be out from under am effective theocracy; the rural folk took a generation or so to convince, by which time the Flag was well under way in its expansions, and the people of what used to be Liannis were starting to think of themselves as the core of an empire.
The second thing Stranger did with his armies (and mages), both the mostly-mercenary city-states' and his new recruits from Liannis, was head back home and take the rest of the city-states around his own. This was his brother's idea, who pointed out that a successful war is often a good way to consolidate your hold on your peoples' respect. And that an alliance of so many city-states hadn't happened for a long time, and it would be a shame to waste it. Stranger laughed and agreed. Once he had both Liannis and the city-states under his banner, he went on to take the neighboring kingdom where the church that had taken over in Liannis originated, in the first major war he undertook.
The Iron Flag has been fairly constantly expanding for the several generations since.