An Introduction to the Byzantine Emperor Heraclius
Prologue: The End of the Roman Empire
Heraclius (610-641 CE) is one of those Byzantine emperors whom most people know nothing about. I'm going to try and remedy that. This story spans three decades and straddles the chaotic period marking the end of Late Antiquity and the beginning of the Middle Ages.
By the early seventh century, the Mediterranean Roman Empire that still existed in the decades after Justinian's reconquests (527-565 CE) began giving way to the much more contained Byzantine kingdom of the Middle Ages. This much-reduced state remained powerful and influential in the region for centuries to come but would never be a Mediterranean power as before. This subsequent history was possible thanks to Heraclius, who quite possibly saved the empire from extinction in the early seventh century. Though he later failed to stem the Muslim tide before his death, he left behind an empire well-enough positioned to defend itself going forward.
The beleaguered empire that Heraclius took over in 610 differed enormously from the one he left in 641. And yet, in some ways, it was the same. Both beginning and end found an empire reeling from defeat. The middle years, however, are where Heraclius shined. This was when he saved the Byzantine empire. His golden years are part of that story.
First, however, we must back up a few years to where it all started.
Heraclius was born in 575, the son of Heraclius the Elder and Epiphania. Heraclius Sr. rose through the ranks during Maurice's reign (582-602) until he was appointed as the Exarch of Africa, a critical post in one of the empire's most important grain-producing territories. However, his patron Maurice lost control of the army in 602 and was murdered after an ill-conceived cost-cutting measure backfired and caused the Balkan army to revolt and march on the capital. The revolt was led by a 54-year old centurion named Phocas, who ended up being proclaimed emperor.
The reign of Phocas was an unmitigated disaster for the empire. Army life had done nothing to prepare him for governing and he quickly discovered that gaining power was the easy part; ruling an empire that stretched from southern Spain to Mesopotamia proved more than he could handle. The circumstances of his rise to power and his humble origins also meant he never had the legitimacy to govern. The previous regime's elites were out to get him, or at least that's what he thought. Phocas spent his eight years struggling to hold onto his power, engaging in repeated massacres of anyone he deemed threatening.
Meanwhile, in the east, the Persian Great King, Khusrau II, used the death of his former benefactor, Maurice, as a pretense to declare war on the Romans. Khusrau owed his throne to Maurice's decisive aid in a Persian civil war in 591. In return, he kept the peace for the rest of Maurice's reign but felt released from this agreement once his ally was dead. Phocas proved unable to effectively defend against these early Persian incursions, with the vital border fortresses guarding the frontier falling in quick succession to Persian armies. 
Heraclius Sr. had observed all this brewing chaos from the relative safety of Africa. We cannot be sure, but he likely was one of those elites who had never accepted Phocas as a legitimate ruler, seeing him as little more than a lowborn scoundrel and opportunist, scum unworthy of the crown. Heraclius Sr. owed his own position to Maurice's generous patronage, and his death and the circumstances behind it would have outraged him. On Phocas's orders, Maurice had been forced to watch the execution of his five sons before getting the blade himself. This had shocked contemporaries as much as it shocks us still today.
By 608, Heraclius Sr. felt the time was ripe to act. The Persians were advancing in the east, and factions within the capital had sent out feelers asking him to intervene. He did so, sending an army under his nephew Nicetas to take Egypt and a fleet under his son Heraclius Jr. to advance on Constantinople.
Alexandria quickly fell to Nicetas, and with it, went Egypt over to the rebels. Now that there was a viable alternative, Phocas's power melted away. Heraclius and his fleet made their leisurely way to Constantinople, stopping at friendly ports along the way to receive the adulation of cheering crowds. As far as civil wars go, this wasn't much of one. No one would fight for Phocas. When Heraclius finally arrived at the capital in 610, it was all but over. Phocas was dragged out of hiding, stripped naked, locked in chains, thrown into a skiff, and rowed out to Heraclius's warship waiting in the harbor.
According to one version, Heraclius, looking down contemptuously from the deck of his ship, asked his beaten rival,
"Is it thus, O wretch, that you have governed the state?"
Phocas gamely shot back,
"No doubt you will govern it better." 
Since Heraclius was not kneeling naked and chained in a rowboat, he got the last word and ordered Phocas's execution.
The anonymous author of the Chronicon Paschale offers more gruesome details of his demise.
"Photius...seized Phocas stark naked from the Archangel Palace, and led him through the harbor in the direction of the mansion of Sophia; after throwing him into a skiff, they displayed him to the ships; and then they brought him to Heraclius. And his right arm was removed from the shoulder, as well as his head, his hand was impaled on a sword, and thus it was paraded along the Mese, starting from the Forum. His head was put on a pole, and thus it too was paraded around. The rest of the body was dragged along on the belly, and brought in the direction of the Chalke of the Hippodrome. Behind his corpse Leontios the Syrian, the former Treasurer, was also dragged: as he was still breathing, someone gave him a blow with a piece of wood by the Chalke of the Hippodrome, and then he died. His head was removed and then his corpse and that of Phocas were borne off to the Ox, where they were burnt." 
There's a sense that Maurice's own murder was finally avenged. Nevertheless, the humiliation and brutality on display here are startling. We realize in this scene that this was a very different world where barbarism was not a label that only applied to shaggy-haired men living in thatched huts far away across distant frontiers. No, barbarism also lurked in the hearts of so-called "civilized" Christian men and women, even those in one of the most sophisticated and cosmopolitan cities in the world. Sure, emperors had been violently deposed in the past, but not recently and never with so much gratuitous violence.
Soon after his coronation, Heraclius married Eudokia. In the two years before she died of epilepsy, the couple had a son and daughter. The son, named Heraclius Constantine (later Constantine III), was proclaimed co-emperor in 613 when he was a year old. Not to get ahead of ourselves, but Heraclius Constantine would be the center of one of the competing power factions that coalesced in the later years of his father's reign. Eudokia was beloved by the people and deeply mourned when she died in 612.  Her premature death and Heraclius's incestuous choice of a second wife divided the court in his later years. More on that later.
Elsewhere, that same year in a cave outside the Arabian city of Mecca, Muhammad received his First Revelation from the angel Gabriel. But nobody was paying any attention to this.
Not yet, anyway.
The disastrous reign of Phocas was over, and Heraclius Jr. was in charge from 610. At 35 years old, he was in his prime. His father vanishes from the historical record at this point. Nothing more is heard from him. Perhaps he died of old age? We don't know. In any case, his son Heraclius was in control of the capital and proclaimed emperor. Given his father's pedigree and Phocas's deep unpopularity, Heraclius enjoyed a legitimacy that his predecessor never enjoyed. He would need it in the coming years.
Heraclius found himself presiding over an unfolding disaster. Few emperors faced such dire circumstances as he did when he took power. The treasury was empty, and revenues plummeted as important tax-paying provinces fell to the Persians one after the other. Even worse, Byzantine armies were demoralized and retreating on all fronts. The following decade would be one of the darkest in Byzantine history, with the empire coming to the brink of extinction.
Under Phocas, the Avars and Slavs had taken most of the Empire's Balkan possessions. Parts of Thrace and Greece remained under Byzantine control, along with a few fortified cities here and there, but little else. So wholly had Maurice's hard-won gains in the Balkans been rolled back that Slav and Avar raiding parties regularly looted the capital's suburbs unchecked. The Byzantines could do nothing but watch impotently from behind the safety of Constantinople's walls. Outside, chaos, not Caesar, reigned supreme. This was a fact on the ground that Heraclius would never be able to address in his lifetime.
Looking east across the Bosphorus at Chalcedon, Heraclius would have seen the Persian army's watchfires burning at night, a reminder of the ongoing collapse in the east. Heraclius even took the field in 613 in an attempt to reverse the tide. It hints at the desperation of the time that he did so, given his lack of military experience. The campaign did not go well, though he probably had few other options. Maurice's best generals were all either dead or too old, while Phocas's either had to be purged or were of shaky loyalty. 
After a campaign near Antioch, Heraclius and Nicetas were defeated by the Persians under Shahin. We don't know much about this battle, just the aftermath, which was the loss of the major city of Antioch and its surrounding territory. The city's Patriarch was slain, and much of the population was deported to Persia. It was a disaster. After this failed counteroffensive, the rest of the east fell like dominoes. Khusrau's best general, Shahrbaraz (more on him later), took Damascus later that same year. Heraclius, defeated, retreated back to Constantinople to lick his wounds.
Sometime, probably in 613/614, Heraclius remarried. This turned out to be one of the worst decisions he made, though he might have disagreed. The girl he married was his niece, Martina, the daughter of his sister Maria. This incestuous marriage was deeply unpopular with the Church and the populace, both of whom never accepted her as a legitimate empress. The Patriarch Sergius disapproved but finally agreed to conduct the marriage ceremony himself. The couple was prolific, having ten children. Unfortunately, the incestuous nature of the marriage (or God's wrath) wreaked havoc on their kids' health. The oldest, Fabios, was born with a paralyzed neck. The second oldest, Theodosios, was a deaf-mute. Another four of their children (two sons and two daughters) died in the 620s while Heraclius and Martina campaigned together in Persia. The unhappy harvest of this marriage still had more fruit to bear later in Heraclius's reign when the still deeply unpopular empress began jockeying to have her son succeed Heraclius over Heraclius Constantine, the son from his first marriage to Eudokia. 
Meanwhile, the fiasco in the east continued.
The Holy City of Jerusalem, with its holy relics, fell in 614. This was a devastating blow to Byzantine morale and was seen by many as a sign of God's displeasure.  The Persians massacred the Christian population, burned the Church of the Holy Sepulchre to the ground, took the Patriarch Zacharias prisoner, and transported the sacred relics of the crucifixion (the True Cross and Holy Lance) back to the Persian capital of Ctesiphon. 
Antiochus Strategos' first-hand account of the sack and massacre captures the horror of the event.
"Meanwhile the evil Persians, who had no pity in their hearts, raced to every place in the city and with one accord extirpated all the people. Anyone who ran away in terror they caught hold of; and if any cried out from fear, they roared at them with gnashing of teeth, and by breaking their teeth forced them to close their mouths. They slaughtered tender infants on the ground, and then with loud yelps called their parents. Their parents bewailed the children with vociferations and sobbings, but were promptly despatched along with them. Any that were caught armed were massacred with their own weapons. Those who ran swiftly were pierced with arrows, the unresisting and quiet they slew without mercy. They listened not to appeals of supplicants, nor pitied youthful beauty, nor had compassion on old men's age, nor blushed before the humility of the clergy. On the contrary they destroyed persons of every age, massacred them like animals, cut them in pieces, mowed sundry of them down like cabbages, so that all alike had severally to drain the cup full of bitterness. Lamentation and terror might be seen in Jerusalem." 
You get the point. It was terrible.
Antiochus recorded the final death toll at 66,505.
Even worse was still to come. In 619, Shahrbaraz took Egypt, one of the empire's oldest and wealthiest provinces and a crucial source of grain. Egypt's loss and the loss of its grain brought famine and pestilence to Constantinople.
It must have seemed like the end of the world as the four horsemen of the Apocalypse (conquest, war, famine, and death) rampaged through the shrinking remains of the Byzantine Empire. Was this really the end? To many, including Heraclius, it must have seemed so. Indeed, during these first tumultuous early years in power, it looked like Heraclius was also in way over his head, just as Phocas had been.
There are signs that he began to lose hope during this dreary decade. How could he not? As the losses mounted, Heraclius considered drastic options. In 614 or 615, with most of the east lost and no clear path to recovery, Heraclius actually sued for peace. He sent ambassadors to Khusrau II with a letter begging for an end to hostilities and even an offer to become a Persian vassal. That letter concludes: "We beg your Clemency to hold our most pious Emperor Heraclius as (your) genuine child, for he eagerly wishes to do the service of your Serenity in all things." Was this what the heir to the Caesars was reduced to, groveling to foreign kings? The Persian King contemptuously rejected this offer and executed Heraclius's ambassadors for their trouble.  So much for that idea.
Now a spoiler alert: though he didn't know it yet - no one did – Khusrau had just sealed his own fate. In retrospect, he should have taken the win on points rather than going for the knockout blow. Like Napoleon and Hitler many centuries later, Khusrau's pursuit of a total victory turned out to be a colossal strategic blunder. However, it was one that only became apparent a few years later. Khusrau had severely miscalculated the strength of his position, leaving the Byzantines no other choice but to stay in the fight and hope for something to break in their favor. That would soon happen, but not yet. For now, there was more Valley of the Shadow for Heraclius to pass through before fortune smiled on him again.
Worse was still to come.
By 615, Heraclius was so broke that he had could only offer half pay to the soldiers. This was paid out in a newly devalued silver coinage printed with the telling invocation "God Help the Romans" on it. As had Maurice discovered to his fatal regret, skimping on army pay was a perilous policy for an emperor who wanted to keep breathing. Heraclius must have known he was flirting with rebellion, but he had no choice at this point. He simply didn't have any other options. 
In 618, he even considered giving up Constantinople and retreating back to the safety of Africa, from whence he came. And who can blame him? This must have seemed like an appealing option. Heraclius knew Africa. It was prosperous, self-sufficient, and far enough away that it was safe from the depredations of Persians and Avars alike. He could finally get some peace and quiet. The Patriarch Sergius and the populace were dismayed at this prospect and convinced him to stay. The mere thought of fleeing to the west hints at just how discouraged Heraclius had become after eight miserable years on the throne. 
That's one way to look at it.
Another is that this also may have been a cunning bluff or an implied threat to scare Sergius into loaning the Church's vast wealth to help get Heraclius back on his feet. That is speculation, but as we'll see, Sergius may have realized that the Patriarch of Jerusalem's fate awaited him if the Persians stormed the capital. What good was all that Church gold if the Persians sacked Constantinople and carried it all off to adorn Zoroastrian temples? The simple fact is that Sergius and Heraclius needed each other.
Truly, by 618, the dying words of Phocas, "And will you do any better?" must have taunted Heraclius in his dreams. So far, he had not done any better and arguably even worse than Phocas. What's remarkable was that rebellions had not broken out as they had under Maurice and Phocas. Whether by sheer luck or through an unspoken understanding among Byzantine officials that now was not the time to bicker internally, Heraclius did not have to deal with constant civil war. His legitimacy to rule was generally recognized and remained stable until the last years of his reign. This lack of internal strife mattered greatly, saving him from having to divert precious state resources he had little of to fend off usurpers.
But all was not lost. It's worth taking stock for a moment to understand the empire's position by 620. Except for a few isolated strongholds, the Balkans were overrun by the Avars and Slavs. Heraclius could do little about it. In the east, Syria, Armenia, Mesopotamia, Palestine, parts of Anatolia were also gone. Worst of all, Egypt fell in 619 with its valuable grain fleets and tax revenues. This was a shattering blow. The situation undeniably looked bleak.
Nevertheless, the empire still had some things working for it. First, Constantinople was nearly impregnable to attack. The formidable Theodosian Walls protected the vulnerable landward side while the Byzantine navy dominated the waters in and around the city. This was critical because it meant that the capital could never be starved into submission as long as it controlled the seas. As we'll see, Heraclius's opponents never managed to build a navy to challenge that supremacy.
Moreover, Constantinople was the largest city in the Mediterranean, making it a trade hub and population center the Byzantines could rely on. The Avars and Slavs might rampage through the Balkans with impunity, but they had no way to crack the capital's defenses, though they would try very hard to do so. Neither did the Persians, for that matter. The forces they had poised across the Bosphorus from Constantinople were at the end of a long and tenuous supply chain.
Africa's agricultural wealth and tax revenues remained undisturbed, giving Heraclius one critical economic region untouched and untouchable by enemy attacks. Africa was the gift that kept giving during this period, offering at least one counter-example that Justinian's foreign conquests, chief among them Africa, ultimately sapped the empire's strength. That was almost certainly not the case with Africa, which served the Byzantines well during this crisis period.
These advantages bought Heraclius time and gave him the means to stay in the fight, if just barely. The Persians and Avars might run unchecked throughout much of the empire, but they couldn't deliver a knockout blow. It looked terrible, and in many ways it was, but the resilient Byzantines still had some things working in their favor.
On the other hand, Persia's massive territorial gains over the last twenty years at Byzantium's expense had left it dangerously overextended. In a way, Persia's unprecedented success had planted the seeds of its own defeat. Khusrau had bitten off more than his empire could chew. The Persians lacked the logistical or administrative sophistication to occupy and govern vast areas of newly conquered territory, not to mention the means of supplying and maintaining an army of occupation hundreds of kilometers from the homeland.  The strain of occupying so much territory and waging constant warfare left Persia itself dangerously exposed to counterattack, a vulnerability that Heraclius realized and began to exploit ruthlessly starting in 624.
However, before Heraclius could use these remaining advantages to take the offensive, he needed money, and lots of it, to rebuild, retrain, and reequip his army. His diminished dominions might give him the means to avoid complete defeat, but they could not generate the kind of tax revenues needed to raise an expeditionary field army.
Remember the Patriarch Sergius? He was worried that Heraclius was going to retreat to Africa. Perhaps moved by that threat, Sergius lent the Church's vast wealth of gold and silver ornaments and bronze statues.  This represented a substantial financial windfall for Heraclius. Church treasures were melted down and reminted as coinage to help him get back on his feet. We don't know how much precisely was donated, but the amount must have been extraordinary. Historian Warren Treadgold speculates: "The proceeds allowed the treasury to clear its arrears, recruit new troops, hire mercenaries, and meet payrolls for several years."  This one-time boon kept Heraclius flush with cash for the next few years of rebuilding and campaigning. This was the break he needed, and he didn't waste it.
Heraclius's military performance to date had not exactly showered him in glory. His victory over Phocas had not required much more than showing up at the capital and having his beaten opponent delivered up in chains. Before his first campaign in 613, he had no battlefield command experience and was leading unfamiliar armies demoralized by an eight-year run of defeat under Phocas.
Imagine a football coach taking over a team near the end of a dreadful losing campaign. That was Heraclius leading Phocas' defeat-conditioned armies in those early years. He was playing with someone else's losers that he hadn't had the chance to train himself. They didn't know him. And, frankly, he didn't really know what he was doing. Not yet, anyway. If Heraclius was going to rescue the empire, he needed to learn the art of war.
His money problem was solved, at least for the moment, and he had the funds to build an army. Now, Heraclius needed the expertise to use it effectively. He was only going to get one shot at this. There were no more filthy rich patriarchs to coax money from. Though the sources are not entirely clear, it looks like Heraclius understood this. He was an intelligent man, after all. He withdrew to his palace in the winter of 621/622 and gave himself a crash course on the art of war. George of Pisidia wrote,
"There...sovereign, collecting all your thoughts and feeding your mind with learned studies, you read about all of the norms specific to wars and public affairs....Then imitating ancient Elisas and wandering in the desert, you fed not on food but on ideas. For there were no matters of military formations with which outlines you did not become acquainted: plans, predispositions, shaping, writing out in advance and sketching the diagrams for others, for yourself, for the army, for the peoples, so to speak, anticipating in summary the battles before they took place." 
We don't know what exactly he studied, but quite likely at the top of his list was Maurice's Strategikon, written around 600. Before his murder, Maurice was an experienced and successful general. He may have been a stingy bastard, but he had led his armies to victory after victory with the limited means at his disposal. In fact, Maurice's understated generalship is all the more impressive when we see how quickly it all fell apart once he was gone.
The Strategikon is a detailed military manual with battle tactics and tips on waging war in the late sixth century. It also describes the fighting strengths and weaknesses of Byzantium's opponents, chief among them the Persians. Here we learn that the Persians preferred fighting on rugged terrain rather than the open terrain that favored Byzantine infantry tactics. They were also vulnerable to flanking attacks, preferred hot weather over cold, and were sloppy about setting up camp for the night, making them susceptible to night attacks. 
Whatever he studied that winter, it worked. The bumbling amateur of 613 emerged as something else entirely. Heraclius soon proved himself a skilled tactician, a cunning strategist, and a savvy diplomat over the next six years. His approach was to first use the non-military tools in his policy toolkit to garner advantages before risking a battle. Battle was always risky, he rightly believed, so it was better to shape the battlefield beforehand using non-military tactics.
In the coming years, Heraclius sowed dissent in the Persian ranks, built alliances with disaffected peoples on the Persian frontiers, and only then used his field army to move in and take advantage of the advantages his non-military tactics had given him. It was the prudent strategy of a commander who understood that his military power was potent for the moment but still finite, fragile, and irreplaceable if lost; diplomacy and subterfuge could accomplish much that arms could not, and at a fraction of the cost.
Now that Heraclius had studied the theory, he needed some practice. On the eve of his first offensive campaign against the Persians in 622, Heraclius set to work getting the army back into fighting shape after two decades of defeat. Hearkening back to the great Roman captains of yore, Heraclius transformed himself into an inspiring leader who led by example, willing to suffer the same privations as his troops.
Gibbon, with his usual eloquence, writes,
"Heraclius himself, with the skill and patience of a centurion, inculcated the lessons of the school of tactics, and the soldiers were assiduously trained in the use of their weapons and the exercises and evolutions of the field. The cavalry and infantry in light or heavy armour were divided into two parties; the trumpets were fixed in the centre, and their signals directed the march, the charge, the retreat, or pursuit; the direct or oblique order, the deep or extended phalanx; to represent in fictitious combat the operations of genuine war. Whatever hardship the emperor imposed on the troops, he inflicted with equal severity on himself; their labour, their diet, their sleep were measured by the inflexible rules of discipline; and, without despising the enemy, they were taught to repose an implicit confidence in their own valour and the wisdom of their leader." 
By 622, he was finally ready, almost a decade after the debacle outside Antioch. At last, after all these years, the Byzantines were going on the offensive.
Meanwhile, down in Arabia, a self-proclaimed Prophet named Muhammad fled north to Medina (the Hegira) in 622 to escape persecution for preaching his new faith of Islam. He found refuge there, and eventually, an army. The persecuted Prophet was also about to go on the offensive.
"Never lead soldiers into combat before having made sufficient trial of their courage." 
By 622, Heraclius finally had an army and enough money to go on the offensive. His strategic priority was defeating Persia. However, he first needed to secure his western flank from the predatory Avars, something he did with the payment of a massive bribe.  What's revealing about Heraclius as a strategist was his balance between bold aggression and prudent caution. He didn't immediately go all-in with a high-risk grand offensive into the heart of Persia because he realized his army wasn't ready for such a campaign. He indeed had a brand-new field army that was bought and paid for thanks to Sergius. But that was about it. There was no easy way to raise another if he got trapped deep in Persia and lost it in an ill-advised campaign far from home. This was it; this was his one shot to turn the tide, and he knew it. In the operations to come, the best strategy was one that navigated this precarious balance between aggression and caution.
Looking back, we can see emerging a crawl, walk, run approach to his strategy. The crawl phase was learning the art of war and then applying these lessons to the raising and training of an army. With that out of the way, Heraclius needed to take his army out for a test drive - i.e., the walk phase - nothing too ambitious or risky, but more of a proof of concept morale-building exercise. This exercise was partly for Heraclius. At this point, he was still little more than an armchair general, all theory and no practice. Likewise, his soldiers had become psychologically accustomed to defeat for the last two decades. They needed to see that it could be different this time.
Little is known about this first, tentative campaign beyond the broad outlines. We know that Heraclius advanced into eastern Anatolia in the direction of Pontus. The Persian commander, Shahrbaraz, who had overrun the Byzantine east during the previous decade, moved north from Egypt to intercept him.
A campaign of maneuver followed for several weeks. Heraclius, perhaps having learned from the Strategikon that the Persians disliked engagements in the open, tried to maneuver his opponent into such a position. On the other side, Shahrbaraz tried to avoid set-piece battles on open terrain that he knew favored Byzantine tactics.
Instead, he lay an ambush on rougher terrain of his choosing. On the eve of battle, Heraclius learned what Shahrbaraz was up to and devised a counter. He had a small force advance as if blindly walking into the Persian ambush. When the Persians sprung the trap, the Byzantine baiting force fled as planned, tempting the Persians out of their hand-picked positions and into a disorganized pursuit. It was all a clever ruse by Heraclius. The "fleeing" Byzantines led the chasing Persians into an ambush of their own. The ploy worked perfectly; the Byzantines routed the Persians. Heraclius had turned the ambushers into the ambushed and won a victory. 
And just like that, the long, twenty-year losing streak was over, and with it, the myth of Persian invincibility shattered. The victory was solid though not decisive. Nothing changed in the overall strategic situation. The eastern provinces were still in Persian hands; Shahrbaraz's army was beaten but intact. Yet the ground had subtly shifted. Heraclius's army now had a real confidence-building victory under its belt and a newfound faith in its emperor.
And so ended the short campaign of 622. Heraclius had tested his army and won a signal victory, giving it the morale and experience for more ambitious campaigns.
Before he could press his advantage against the Persians, Heraclius had to return to Constantinople to deal with another threat from the Avars. Once again, they had reached the outskirts of the capital and were doing what they did best: plundering, pillaging, and enslaving Byzantines. Heraclius needed peace with them before he could return east. In June 623, he arranged to meet the Avar Khan outside the city for negotiations only to discover that the duplicitous Khan had planned an ambush to take him hostage. Heraclius barely escaped, and only by throwing away his regal garments and tucking his crown under his arm before galloping back to the city as fast he could.
Nikephoros tells the story,
"Three days later the Chagan [Avar Khan] arrived before Herackleia with a great throng of Avars. After picking among his followers a contingent of the bravest fighting men, he sent them to the overgrown and wooded heights overlooking the so-called Long Walls and scattered them secretly in the bushy hills that are there so that, taking the emperor in the rear, they might encircle him and make an easy prey of him and his retinue. Upon becoming aware of them, Heraclius, greatly astonished at this unexpected event, took off his purple robe and, putting on instead some mean and miserable clothes so as to appear like an ordinary man to anyone he encountered; hiding, furthermore, his imperial crown under his arm, immediately turned to ignominious flight and barely escaped to Byzantium. The Avars set out in hot pursuit and reached the plain in front of the city that is called Hebdomon, where they encamped. Spreading out from there as far as the bridge of the river Barbysses, they grievously devastated the settlements that are there and pitilessly slaughtered the Roman people." 
This episode highlights a couple of things.
First, just how precarious the Byzantine situation remained and how much it relied on one man: Heraclius. Though he'd beaten the Persians once in battle, little else had changed. The Avars remained unchecked in the Balkans, while the Persians still held the East. Even after this close call with the Avars, Heraclius still desperately needed peace with them to have any chance of defeating Persia. What if he'd been captured? Then all of his hard work so far would have probably been reversed.
Second, this close call and its aftermath showed that Heraclius understood where his strategic priorities lay - in the East. He wasn't going to let his wounded pride get him sidetracked from the more important goal of defeating Persia, even if it meant agreeing to a humiliating peace with a duplicitous barbarian chieftain. Heraclius rightly prioritized defeating Persia. Persia was by far the more dangerous foe. It still occupied the empire's wealthiest provinces. The less productive Balkan territories, on the other hand, would have to remain of secondary importance.
Heraclius was not a stupid man. He knew that any deal with the treacherous Avars could only be temporary and that the Khan would likely break the treaty as soon as it suited him. Why wouldn't he? The Byzantines couldn't defend themselves in the west and could therefore be squeezed into paying large bribes. This proved to be the case. As always, the Khan proved untrue to his word. But not quite yet. Heraclius swallowed his pride and bought himself what amounted to another year of campaigning in the East.
Finally, it's worth noting that Heraclius had the money to buy off the Avars with a hefty bribe of 200,000 solidi while still funding his Persian campaign. This provides further evidence that the money woes of his early years had for the moment abated. But the pride-swallowing required additional sacrifice. Heraclius had to turn over hostages to the Khan, including his illegitimate son, John "Atalarichos," and his nephew (son of his sister, Maria) Stephen.  That he did so shows how badly he needed this peace.
Even so, that must have been an awkward father-son conversation.
"Son, I need to ask a huge favor."
So ended the tumultuous year of 623, with the Avars dulling the euphoria of the prior year's victory. Even so, Heraclius had bought off the threat for the moment. The Avars took their money and withdrew. With this threat mitigated, Heraclius returned to his army in eastern Anatolia in March 624. He would not return to Constantinople for another four years.
Here begins the "run" phase of his strategy.
Elsewhere, Muhammad, now based at Medina, defeated the Quraysh Meccans at the Battle of Badr. His Muslim followers began a sustained raiding campaign over the next six years of attacking Meccan caravans to weaken its economy. As the caravan raiding succeeded, the movement gained momentum, adding converts and allies along the way. Islam was now a force to be reckoned with, at least in southern Arabia.
"Since the days of Scipio and Hannibal, no bolder enterprise has been attempted than that which Heraclius achieved for the deliverance of the empire." 
In 624, Heraclius took the war deep into Persian territory for the first time. His plan wasn't only to drive the Persians out of occupied Byzantine provinces. Oh no, his goal was much ballsier than that. He meant to go around them entirely and drive straight into the heart of the Persian empire; there, he intended to chew it up from the inside and compel Khusrau to make peace.
In reality, Byzantine weakness had masked Persia's own strategic vulnerabilities for years. Heraclius intuited that the Persian empire was not as cohesive as it seemed; in fact, it was riven with internal rivalries and discontent that could be exploited in the right circumstances. The imposing presence of an invading army would bring those tensions to the surface. Moreover, Persia was severely overextended, with its best troops occupying distant Byzantine territories. The Persian homeland was therefore open to attack.
When the campaigning season opened in 624, Heraclius unexpectedly advanced into Persian-occupied Armenia, taking and sacking several cities along the way, including Theodosiopolis and Dvin. He then invaded the Persian province of Atropatene, putting him within striking distance of Mesopotamia and the Persian capital of Ctesiphon. By now, Heraclius definitely had Khusrau's undivided attention. Khusrau advanced north with a newly-recruited army to Ganzak but then lost his nerve at the sight of the Byzantine army and fled back to the south toward Ctesiphon. 
Heraclius pursued, stopping along the way to sack a Zoroastrian temple at Ganzac and to loot the Great King's nearby summer palace, no doubt repaying a little bit of the debt from Jerusalem's sack ten years earlier. Rather than pressing his advantage further and risking a setback, Heraclius retreated back north that autumn, settling in for the winter on the northern Persian frontier near the Caucasus. There, menacingly poised at the edge of the Persian empire like a dagger, he rested, refitted, intimidated, and recruited heavily among the discontented Persian Christians in the Caucasus region.  In this first year's campaign, we see evidence of Heraclius's mix of boldness with caution. He advanced deep into Persia but then pulled back at the end of the campaigning season.
Perhaps he had in mind Roman emperor Julian's disastrous Persian campaign from three centuries earlier. Julian had also campaigned deep in Persian territory in 363 but had pressed his luck too far. He ended up encircled by Persian armies and out of supplies far from friendly territory. The ensuing chaotic retreat somewhat resembled Napoleon's from Moscow in 1812. Julian was killed, and the Romans had to sign a humiliating peace to extract what was left of their army. Heraclius intended to avoid these same mistakes. He cashed in his winnings and went north for the winter.
Khusrau used the respite provided by the end of the campaigning season to recall his best generals from the west and levy new armies for the following year's campaign. In the spring of 626, the Persians took the offensive. Sending three armies at once, Khusrau meant to trap Heraclius far from home and annihilate him once and for all. If Heraclius was trying to avoid Julian's mistakes, Khusrau might have been trying to replicate the Persian strategy that had defeated him. These three Persian armies were likely each inferior in quantity and quality to the Byzantines. For the best shot at victory, they needed to converge on Heraclius's force at roughly the same time.
In premodern warfare, coordinated operations between multiple armies over extended geographic distances were complicated to execute. There were no radios or telegraphs to coordinate movements. Unfortunately for Khusrau, the Persians were not logistically sophisticated enough to pull off such a complex maneuver. Undoubtedly impressive on paper, the Persian plan failed to achieve the synchronized movements needed to trap the Byzantines. Heraclius made them pay dearly for that lack of coordination.
Over the next few weeks, he skillfully outmaneuvered the Persians, isolating and defeating each army in turn. Heraclius first engaged in some trickery to confuse Shahrbaraz, who was still some ways off with his army but fast approaching. To sow confusion, he sent a few false deserters to the Persian leader with bad intel that Shahin was already pursuing the beaten remnants of Heraclius's army. Shahrbaraz didn't want his rival to steal all of the glory and hastened his pursuit to get in on the supposed route. It was all disinformation. With the Persians rushing pell-mell to finish off the Byzantines, they became disorganized and uncoordinated, which was the point. He had feigned retreat (sound familiar?) but was actually luring the Persians onto battlefields of his own choosing and at the times of his choosing. Heraclius then counterattacked, isolating and defeating first Shahraplakan and then Shahin before they could merge. Shahrbaraz still pursued, as did the mauled remnants of Shahin's army. Heraclius again caught Shahin's reduced force and defeated it, the mangled remnants of which merged with Shahrbaraz, who kept after Heraclius. 
During this campaign, the Byzantines seem to have had much better scouting and intel than their opponents. This helped Heraclius stay one step ahead. He discovered that Shahrbaraz was camped and was not expecting an attack. Heraclius applied some advice straight out of the Strategikon, which stated, if you'll remember, that the Persians haphazard encampments made them vulnerable to night attacks. Heraclius attacked at night and thoroughly defeated Shahrbaraz, who fled naked to escape capture, abandoning his wives to the Byzantines. 
Heraclius thus ended another successful campaign season (625) and set up winter quarters in northern Mesopotamia, unbeaten and for a second year and poised within striking distance at the heart of the Persian empire. He now had a confident, battle-tested force that was qualitatively superior to anything the Persians could field. Heraclius had proved himself a skillful commander. The two generals who had outfought him in 613, Shahin and Shahrbaraz, were now the ones getting outfoxed. Heraclius had literally caught Shahrbaraz with his pants down and made him pay dearly for it. The tide was turning. From this clear position of strength, Heraclius offered peace to the Persian King. Yet again, Khusrau had an exit ramp and could have concluded the war on favorable terms.
A look at a map showed the Persians still up on points, even if the Byzantines were quickly closing the gap. Even with the Byzantine resurgence of the last three years, the Persians still occupied most of the east, including Egypt, Palestine, Syria, and parts of Anatolia. Khusrau therefore still had pretty good negotiating leverage, though much less than in 616 when Heraclius had sued for peace.
In fact, the norm for Romano-Persian wars over the centuries was that they usually ended with a peace treaty when one side or the other gained an advantage after some intense campaigning. Some frontier fortresses might be traded in the peace negotiations, but little else changed. Rarely did these campaigns penetrate into the hinterlands of either empire. A sort of equilibrium had always existed that both sides generally respected.
This time was different. Heraclius's peace offer was probably authentic. He would have made peace in this traditional manner, using his momentary advantage to force the withdrawal of Persian armies from Byzantine territories and to return the borders to what they were in 602 when Maurice died. But Khusrau's pride wouldn't let him accept anything other than total victory, even as that prospect began to seem like a fantasy. And so the Persian king rolled the dice on another campaign, hoping to give the Byzantines a taste of their own medicine. If the Heraclius wanted to threaten the center of his own empire - so be it - Khusrau was going to do the same to him, teaming up with the Avars to take a shot at the grandest prize of them all: Constantinople.
In the spring of 626, Khusrau sent two armies to Anatolia, one under Shahrbaraz which advanced to Chalcedon across the Bosphorus from Constantinople. The other was under Shahin, who was to campaign in eastern Anatolia. Khusrau also concluded an agreement with the Avars to launch a combined assault on Constantinople.
Khusrau probably hoped for one of two outcomes: First, Heraclius would have to abandon his strategically powerful position in Persia and rush back to protect his capital. This would have the desired effect of relieving pressure on the Persian Empire and negating Heraclius's hard-won gains. That was the more realistic scenario. However, an even better outcome would have been the capture of Constantinople by assault. This probably would have ended the war and perhaps the Byzantine empire in one dramatic coup.
But Heraclius didn't panic and take the bait. Instead, he divided his army into three parts. The first was sent back to help defend the capital; they managed to arrive just before the siege began. The second was under his brother, Theodore, whose job was to pursue and defeat Shahin's army in eastern Anatolia. This he did in short order, routing Shahin and killing him in the process. The third force, under Heraclius, remained in place in the Caucasus, near the Persian border, where its presence continued to destabilize Persian rule in the region.
Meanwhile, Constantinople's defense was in good hands. Sergius and the competent Magister Militum of the city, the patrician Bonos, conducted a stout and able defense of the city. All told, they had perhaps 12,000 defenders, including the veterans sent by Heraclius.
By the end of June 626, the Avar Khan had arrived with a vanguard of 30,000 outside the capital's landward walls on the European side.  The Avar force set to work building siege engines to assault the city. Meanwhile, Shahrbaraz arrived across the straits at Chalcedon, directly opposite the capital. By July, the Avar siege engines were ready and the Avar-Slav army began its assault on the city's defenses. By all contemporary accounts, the fighting was fierce. The capital's fortifications were famously formidable, while the Avars were skilled besiegers. The defenders held, but one gets the impression that it was a close call. Contemporary Theodore Synkellos wrote,
"It was on the land side the most frightening sight to behold, and to see it was to derange the senses. For against each one of our soldiers there were a hundred and more barbarians, all dressing in breastplates and helmeted, bringing every war machine. The sun rising from the east accentuated the iron, and made them appear frightful, and shook the viewers." 
True to Byzantine form, Bonos attempted to buy off the Khan to get him to break off the attack. The supremely confident Khan rebuked these offers with a counterproposal of his own, telling Bonos, "Withdraw from your city, leave me your property, and save yourselves and your families." Needless to say, that was not going to happen, so the defenders fought on.
Sergius carried an icon of the Virgin around the city walls and through the city to inspire the defenders that they had God on their side. This may seem like a trivial thing to do, but it would have been a huge morale boost for the Christian defenders to see their spiritual leader up on the walls where the fighting was taking place. Surely God was on the Byzantines' side. On 30 and 31 July, the Avars and Slavs launched the first in a series of coordinated assaults on the city's defenses. Heavy fighting took place between the Gates of Polyandriou and the Romanos Gate, but still, the defenders held. 
On 2 August, the Khan, perhaps realizing that the city would be harder to take than anticipated, called again for negotiations. The Byzantines sent a delegation of five patricians to treat with the Khan. What they found really pissed them off. Three pompous Persians "dressed in silk" were seated beside the Khan while the Romans were forced to stand. These Persians taunted the Romans, saying that "Your emperor has neither invaded Persia nor has your army arrived." Both claims were false. The Khan repeated the demand that the Byzantines abandon Constantinople. The citizens should leave with no more than the clothes on their backs. The Romans refused again, and the negotiations broke off.
Interestingly, there's a grim epilogue to this episode. The arrogant Persian delegation was intercepted crossing the Bosphorus on their way back to the Persian camp. What follows is another gruesome scene from the author of the Chronicon Paschale, this time reveling at the payback the Persians received for their arrogance. After being captured on their boat heading back to Chalcedon, the Romans took brutal revenge.
"Our men chopped off the two hands of one of the surviving Persians, tied round his neck the head of the man slain in the skiff, and sent him to the Chagan [Khan]. The other was thrown into a skiff and taken alive to Chalcedon; when he had been exhibited to the Persians our men beheaded him just as he was in the skiff, and threw his head onto land with a message that read like this: 'The Chagan, after making terms with us, sent us the ambassadors who were dispatched to him by you; two of them we have beheaded in the city, while look! you have the head of the other!'" 
Meanwhile, the Persians under Shahrbaraz continued sitting out the battle because they could not get across the narrow, river-wide strait separating Europe from Asia. The Avars' Slav allies attempted to solve this problem by ferrying across thousands of Persians in small canoes. But the Byzantine warships were waiting; they intercepted and sank this make-shift fleet of canoes filled with armor-laden Persian soldiers, thousands of whom drowned in the ensuing debacle. 
By the time Heraclius's brother Theodore arrived with his army, fresh off his victory over Shahin, the Avar-Persian assault collapsed. The trash-talking Khan broke camp and retreated in defeat, forced to deal with a severe revolt among his Slav subjects. Perhaps it was the canoe debacle? The Avar-Persian alliance floundered because the Persians didn't have the means of influencing the battle. They ended up as impotent bystanders for much of the siege.
The Avars had made a serious effort against the landward defenses, building siege towers and deploying siege artillery. In the end, though, they were no match for Constantinople's multi-layered defenses. They would not be the last to break themselves on the city's walls. Even in the darkest days of the Muslim advance over the next century, and there would be some very dark days indeed, the capital's defenses would frustrate besiegers again (674-678 CE), and again (717-718 CE). Not until the Crusaders arrived in 1204 and took the city by treachery would Constantinople fall to a foreign army.
The crisis passed. Heraclius had gambled and won. This was the last offensive card the Persian King had to play. The Avars were now off the board, dealing with their own internal problems. During the siege, Heraclius didn't panic. He kept part of his army in Persian territory; this allowed him to quickly resume the strategic offensive now that the threat to his capital had passed.
While he did not yet have the strength to go on the offense in that summer of 626, he did the next best thing by enlisting the aid of the Gokturks to attack instead. Imagine something like the Dothraki from Game of Thrones or Atila's Huns, and you'll have an idea of what the Gokturks were like. They launched a devastating raid into Persia while most of Khusrau's armies were still far away in Byzantine-occupied lands.  Thus, Heraclius used diplomacy to further weaken Persia without risking his own army. While the Gokturks were running amok in Persia's northern provinces, Heraclius recombined his three armies and prepared for a knockout blow against Persia.
However, before that happened, he engaged in some opportunistic diplomacy that neutralized one of his oldest and most dangerous rivals. This was Khusrau's best commander, Shahrbaraz, who was about to sit out the rest of the war.
Shahrbaraz had long been one of Khusrau's most reliable field commanders. Remember, he had embarrassed Heraclius back in the campaigns of 612/613 and had been the Byzantines' most feared military adversary. Though Heraclius had turned the tables and got the better of Shahrbaraz in their most recent engagements, he remained a dangerous opponent. Still, Khusrau was unhappy with his general's performance, or lack thereof, especially during the siege of Constantinople in 626.
The story goes something like this: In late 626 or early 627, after the capital's siege had ended in failure, Khusrau supposedly sent a messenger with orders to execute Shahrbaraz. The Byzantines intercepted the message and forwarded it to Heraclius, who saw the perfect opportunity to sow division in the enemy camp. He kindly informed Shahrbaraz of his king's order and arranged a meeting to show him the letter's contents. We don't know the exact details, but the outcome of that meeting was that Shahrbaraz reached a separate agreement with Heraclius to retreat from western Anatolia and sit out the rest of the war.
To get the Persians under his command to buy into this plan of passive rebellion against the Persian King, Shahrbaraz went one step further. He falsified the original letter, swapping out the order for his own execution, and adding in the names of 400 officers under his command instead. Believing their king betrayed them, these officers threw in their lot with Shahrbaraz. Historian Walter Kaegi was correct to call this the turning point in the war.
Khusrau's best general and the veteran field army he commanded were now off the table. Heraclius's most significant victory turned out to be a diplomatic one. Shahrbaraz pulled back to Persian-occupied Syria and Egypt, where he maintained a state of careful neutrality until the war's end three years later. This diplomatic coup, and the receding of the Avar threat after the siege, gave Heraclius the opening to consolidate his armies and resume the offensive deep in Persian territory. 
By 627, the strategic balance had shifted dramatically from the year before. The Avars were out of the picture. Shahrbaraz and his powerful army were too. The Byzantine east was still Persian-occupied, true, but now by a neutral force, and no longer on behalf of the Great King. Heraclius could turn his undivided attention to the now-vulnerable Persian empire proper. Khusrau's options were rapidly dwindling. Heraclius knew this and didn't waste any time, preparing his reunited army for a long campaign and enlisting the aid of various mercenary bands in the Caucasus eager to see Persian power diminished. By the time his preparations were complete, he had around 70,000 experienced veterans ready to attack Persia. In addition, Heraclius pressed his advantage with another diplomatic coup. He again convinced the Goturks to attack Persia, which they did with devastating results. Walter Kaegi relates one near-contemporary account given by Moses Dasxuranci.
They [the Goturks] spared neither the lame nor the old, neither did they feel pity, mercy, or compassion for the children who clutched their murdered mothers and sucked blood from their breasts in place of milk. Like fire among straw, they entered at one gate and emerged through another, and in their wake they left work for the birds and beasts of prey. 
We start getting evidence that Khusrau was having trouble raising new armies. It was as much a fact in ancient warfare as today that a well-trained, battle-hardened army will make short work of any hastily raised and poorly trained force. This was the position that Khusrau now found himself in. He could still levy troops, but nothing to match the quality and the quantity of what Heraclius already had on hand.
There's no evidence that Khusrau truly understood his predicament. He comes across in the sources as cruel, petty, arrogant, vindictive, and increasingly detached from reality. Heraclius did not suffer from these limitations. He understood how strong his position was while remaining conscious of its fragility. The loss of his army from some calamity would have once again turned the tide of war back in Persia's favor. He wasn't going to let that happen.