As President Obama considers how to respond to the Russian military invading Ukraine, he may do well to heed the lessons of history.

Three days after the Bay of Pigs invasion, President John F. Kennedy met with his former opponent, Richard Nixon. Despite the political embarrassment the president faced after supporting a botched attempt to topple Fidel Castro in Cuba, Nixon realized he and his Republican colleagues had to stand by the Democratic president until the crisis subsided.

The Soviet Union, Nixon explained, “would probe and prod in several places at the same time, and as soon as we showed any weakness, [it] would create a crisis to take advantage of us.”

The world has changed drastically since 1961, but this basic principle still rings true: the United States must respond credibly to international acts of aggression if it hopes to maintain its own influence and secure global stability. The world is a dangerous place, with numerous potential flashpoints. American strength helps deter international conflict — but only if the world’s aggressors believe that America is willing to punish their belligerence and protect peace.

Unfortunately, Russian President Vladimir Putin seems to have concluded America is unwilling to do so. That is likely why he decided to send Russian troops into Ukraine last weekend.

Tensions between Ukraine’s pro-Russian president and many of the country’s pro-European citizens had been flaring up over the past few months, after the Ukrainian president rejected a deal to strengthen Ukraine’s ties to the European Union. The government cracked down on the protesters, and the country’s parliament ousted its president.

Putin, likely anticipating a weak American response, took advantage of this unrest and sent Russian troops into Ukraine in an attempt to keep the country within his sphere of influence.

President Obama should act decisively, but also responsibly, to isolate Russia and punish such aggression. There are a number of policies he could pursue to achieve this goal, such as placing sanctions on both the country and high-ranking Russian officials.

However, any policies President Obama pursues should fulfill three main criteria: they should be strong, credible and clear.

Putin was confident enough to invade a sovereign nation despite President Obama’s warnings that there would be consequences for doing so. It is unlikely that a gentle rebuke will convince him to pull out of Ukraine. Whatever course President Obama pursues should sufficiently pressure Putin to withdraw or negotiate.

Yet, President Obama must be careful not to oversell his response. The president should brandish credible policies that Putin believes America can and will implement.

Here, some of the Obama Administration’s past stumbles may hamper its efforts. For instance, President Obama indicated that Syrian use of chemical weapons in its civil war would demand action, but he later failed to follow through when it became clear chemical weapons had been used. This past disconnect between rhetoric and action could undermine the Obama Administration’s credibility in Moscow.

Because of this, it is important that President Obama choose policies that his administration can realistically implement — and make sure these policies align with his rhetoric.

This is not to say the president should specifically rule out any particular options. Indeed, it may be good strategy to tacitly leave certain options on the table, without any indication of when or how they might be employed. But to the extent the president indicates that specific action will be taken under certain circumstances, he must be willing to follow through if those circumstances are met.

Of course, in order for this to be effective, President Obama must clearly communicate the outcome he desires and his resolve for achieving that outcome, so Putin fully understands the consequences of his actions.

President Kennedy knew these lessons well. A year after the failed Bay of Pigs invasion, the Kennedy Administration discovered the Soviet Union was shipping nuclear missiles to Cuba. The Joint Chiefs of Staff recommended an immediate military strike on Cuba, but President Kennedy opted instead for a naval blockade of the island — a course of action he was willing to implement. And he was clear about what the blockade was trying to accomplish and how the United States would react in the event Cuba launched a nuclear missile.

The Cuban missile crisis holds an additional lesson for President Obama. During the crisis, President Kennedy was ready and willing to negotiate with the Soviet Union in order to avoid war. In the end, President Kennedy agreed to remove American missiles from Turkey and Italy, and the Soviet Union agreed to remove its missiles from Cuba. The world avoided nuclear war.

The stakes today are surely not as high as the Cuban missile crisis, but they are nonetheless still significant. Unless the United States responds credibly to Russia’s aggression today, it can expect to see more of the same from Russia and other antagonists in the future. Such a course would be both dangerous for America and destabilizing for the world.

As President Kennedy was fond of saying, “Domestic policy can only defeat us; foreign policy can kill us.”