Missiles fired from a U.S. drone killed Iranian Maj. Gen. Qasem Soleimani, commander of Iran’s Quds Force in Iraq, and nine members of his entourage on Jan. 3. The attacks, allegedly motivated by revenge, drove the Iranian government to vow its own vengeance. President Trump responded by threatening to destroy 52 sites “important to Iran & the Iranian culture,” which would be a gross violation of international law. On Wednesday, Iran countered with a missile attack on Iraqi bases housing American forces.

In a statement Wednesday, Trump seemed to take a step back from escalating the cycle of vengeance. That’s crucially important. He must continue down this path, taking a lesson on the dangers of revenge from the first man to hold his office: George Washington. His experience during the Revolutionary War demonstrates restraint in the face of provocation has enduring benefits far sweeter than revenge taken in haste.

Before he was the gray-haired, tight-lipped “father of his country,” Washington was the leader of a popular insurgency that threatened the world’s unrivaled superpower: Great Britain. For eight years he defied Britain’s forces through a mixture of conventional and unconventional tactics. Although regularly defeated in battle, Washington succeeded at holding his army together, making the war a costly quagmire for the crown.

Yet the British persisted. To their mind, Washington and his Continental Army were traitors to be punished not conciliated. Until the very end of the struggle, British forces considered Americans in arms against them to be “unlawful combatants” — men who did not deserve the protections of the contemporary laws of armed conflict.

This conception drove the brutal British war effort. Early on, British commanders held captured Americans in Boston’s dungeon, allowed nothing but bread and water, while they awaited their fate. Washington decried this “unworthy Treatment,” and reminded his British counterpart that the Americans treated British captives “with a Tenderness due to Fellow Citizens, & Brethren.” The American general had personally intervened to protect his prisoners “from the Fury of a justly enraged People.” He hoped this positive example would induce the British to reform their “barbarous Behaviour.”

But the British maintained the revolutionaries should be punished. Although they declined to hang captured Americans (the traditional British penalty for treason) out of fear of alienating the people whose hearts and minds they hoped to win; they implemented an incarceration system that proved nearly as deadly.

After capturing New York City in 1776, British Lt. Gen. William Howe chose to confine American prisoners on overcrowded and disease-infested prison ships moored in the harbor. There, thousands wasted away in captivity. One historian has estimated that as many as 18,000 Americans may have perished on these ships, more than all the battlefield fatalities of the war combined. Predictably, Americans were furious. They demanded vengeance.

Washington, however, cautioned restraint. He feared that if the United States sought revenge against the British, the new nation would cede the moral high ground. Perhaps more importantly, reprisals might persuade the enemy to escalate the violence of their war effort, imperiling innocent civilians and prisoners alike. As he informed the president of the Continental Congress, John Hancock, revengeful punishments were “founded in impolicy, and will, if adhered to, produce consequences of an extensive, and melancholy nature.”

But American restraint did little to diminish British abuses. In spring 1782, months after his decisive victory over British Gen. Charles Cornwallis at Yorktown, Va., Washington received word that American Capt. Joshua Huddy had been hanged in retaliation for the death of Loyalist officer Philip White. Huddy’s murder sparked another round of popular demands for vengeance. Yet, Washington remained steadfast in urging restraint.

Instead of broad scale revenge, he opted for the doctrine of proportional retaliation, a concept sanctioned by contemporary European jurists, which was intended to deter violations of the rules of war by authorizing proportional reprisals. This legally allowed Washington to hang an innocent prisoner of equal rank to Huddy if the British did not turn over the American’s murderers for trial. Charles Asgill, a 19-year-old British captain captured at Yorktown, was selected by lot as the subject of that retaliation.

The British refused. But Washington remained measured in his response, and didn’t execute Asgill right away. As he informed one of his officers, “I most devoutly wish his life may be spared.” Gen. Henry Knox was confident that Washington would not authorize the execution “until every other method has been tried in vain.” This news pleased Alexander Hamilton who feared that killing Asgill would “be derogatory to the national character” of the United States and only serve to prolong a bloody war they had all but won.

By delaying the young Briton’s execution, Washington bought time for the America’s French allies to intercede with Congress. Asgill’s mother was an aristocrat of French descent who pleaded with Queen Marie Antoinette to intervene.

It worked. And cooler heads prevailed in Congress.

On Nov. 13, 1782, Washington wrote to Asgill with “singular pleasure” to announce his release. Americans had come to agree with Washington that Asgill’s death would not bring justice for British wrongs but would damage America’s reputation instead. The British, for their part, took Washington’s lesson to heart. They finally acknowledged Americans as legitimate combatants, and peace soon followed.

In the end, restraint had trumped revenge. Why? Because Washington was always aware that his actions had implications that would endure beyond the heat of the moment and set a precedent for future generations. In concluding the Asgill affair without the further loss of life, Washington eschewed the temporary gratification of revenge to prevent the further escalation of violence and to preserve his nation’s reputation on the world stage. Trump would do well to take heed of Washington’s warning. If not, the “impartial world must, and certainly will,” render its judgment.