In the three weeks since the presidential primary season began, the race for the GOP nomination has entered a new — and considerably nastier — phase. While the candidates have clearly worked to “out tough” their rivals, they might also consider the effect their rhetoric may have on adversaries overseas — and, like Ronald Reagan, use that rhetoric strategically.

The candidates have not skimped on the tough talk while on the stump. Take the plan to confront the Islamic State, for instance. Sen. Marco Rubio (Fla.) has outlined a more aggressive military campaign, including an increase in U.S. ground troops. Sen. Ted Cruz (Tex.) stated he would carpet bomb ISIS “into oblivion.” Businessman and GOP front-runner Donald Trump took an even more direct approach: “I would bomb the s— out of ’em.”

This is standard fare in a presidential campaign. Candidates work hard to leave impressions with voters, impressions that are often calibrated based on the audience. They speak before congregations to convey honesty and spirituality. They visit diners to look relatable and empathetic. They make foreign trips to appear statesmanlike and competent on the world stage.

Within the GOP base, many voters seek strength and toughness in the next commander in chief, particularly as a host of global security challenges portend trouble in 2017. Tough talk on defense policy works.

The playbook, therefore, is quite simple. But it is not just primary voters who are listening. Adversaries around the world are paying attention to the campaign, and candidates may use this opportunity to send powerful signals abroad.

For evidence of this, one need look only to the 1980 campaign of the GOP’s patron saint, Reagan. Because it came in the midst of the Iran hostage crisis, the campaign offers an important case study on how rhetoric on the campaign trail can affect policy after an election.

Long before he squared off against President Jimmy Carter, Reagan had earned the reputation as a cowboy. This image was used as a sign of derision by his foes. The Soviet media frequently deployed this caricature; a particularly interesting cartoon series in Pravda depicted “Ronnie the Cowboy,” with hat and swastika badge. The underlying message was that Reagan was dangerous and erratic, unfit to be the commander in chief.

Reagan’s supporters liked the cowboy reputation. And Reagan himself did little to dispel the image within friendly circles. But in addition to currying favor among voters seeking a “tough” leader, Reagan found this reputation useful when confronting unfriendly regimes.

During the 1980 campaign and transition, he and his team deftly exploited this image in hopes of affecting the most pressing foreign policy issue of the time: the Iran hostage negotiations.

Versions of this story have been recounted by key transition officials from both the Carter and Reagan camps. In his autobiography, Reagan remembered his public posture as a deliberate strategy aimed at influencing the behavior of the Iranian negotiators:

The Algerian and Swiss go-betweens who represented us during the hostage negotiations with the Iranians said that the final weeks of negotiations had been dominated by a concern among Iranian officials that they would have to do business with the new administration. In the weeks leading up to the inauguration, I had gone out of my way to say some nasty things in public about the Ayatollah Khomeini, hoping it would encourage him to expedite the negotiations before we arrived in Washington. I referred to them at one time as barbarians. Whether this had anything to do with the hostages’ release on inauguration day, I don’t know.

Senior arms control adviser Kenneth Adelman was one of the strongest advocates of the cowboy routine. As he recalled in a September 2003 interview:

It was my firm belief . . . that it would be best if Reagan wasn’t seen as following the negotiations at all. Why was that? Because he had the reputation of the wild cowboy. I thought that that was the best reputation that he could have when he came in trying to solve the hostage situation. I didn’t want to make it seem like he was a normal diplomat who followed these kinds of things. I liked the wild cowboy routine.

Incoming Secretary of State Al Haig, who insisted that the new administration honor any deal made with Tehran, had a similar recollection in his autobiography:

There was a useful doubt in the minds of all those involved as to how the new administration might handle this situation once it came to office. The Iranians (and some others involved in the negotiations) feared that Reagan might avail himself of options that the forbearing Carter had eschewed. We did nothing to disabuse the parties of their anxiety; it could only speed the return of the captive Americans.

And in Lou Cannon’s “Role of a Lifetime,” widely considered the authoritative biography of the Reagan presidency, this deliberate plan made its way into the negotiating sessions:

According to [Lloyd] Cutler, chief U.S. negotiator Warren Christopher warned the Iranian government through an Algerian intermediary that Reagan might be unwilling to approve an arrangement that freed the hostages in return for the release of frozen Iranian assets. This was exactly the message that the Reagan team hoped Carter would send to Iran. As [Edwin] Meese put it in 1981, the signal from the incoming administration to Iran was “Don’t expect a better deal from Reagan.”

Whether this actually had an effect on the negotiations is a matter of debate. But the lesson is clear: Candidates are not only creating impressions on voters, they are sending important signals to adversaries they will confront once in the Oval Office.

As history shows, the first year of a presidency is the time of greatest peril. It serves as a worthy reminder to the campaigns: Candidates begin laying the groundwork for their first year — today.

Jeff Chidester is the director of policy at the University of Virginia’s Miller Center. He is the author or editor of three books on the Reagan presidency.