The way American news media and politicians have characterized the Russian “threat” has often been hysterical and overblown.

Not any longer. Intelligence agencies believe that Russia hacked US political organizations to manipulate the election—the core of any democracy. President Barack Obama has vowed to retaliate in the manner and “at a time and place of our own choosing.”

We could have seen this coming. One clear consequence of the triumphalist post-Cold War US expansion of the NATO alliance, right up to Russia’s western border, was the rise of a nationalist Russian leader—Vladimir Putin—and his aggressive stance against the West in Georgia, Ukraine and Syria. Unlike the United States, with its vast ocean moats and huge distances from the world’s centers of conflict, Russia has lots of reasons to feel insecure at its borders.

Throughout history, the Russians have been invaded multiple times. The Nazi invasion led to 25 million dead. So Russia has legitimate concerns about maintaining a security buffer of friendly territory in nearby areas, like Georgia and Ukraine. Moscow also is adamant about helping one of the few allies it has left in the world—Syria.

So Putin’s pushback is not just to show he is macho. Even his heavily criticized annexation of Crimea, formerly in Russia and with a Russian-speaking population, was predicated primarily on its strategic value in housing a naval base on the Black Sea.

The Russian economy, meanwhile, has been weakened by the low price of oil and Western economic sanctions imposed over Russian intervention in Ukraine. Consequently, Russian defense spending had been increasing, but it is now projected to decline for the next few years. Russia spends about $66 billion per year on defense, which is only about 11% of the almost $600 billion annual US defense budget.

The CIA is now making the accusation that Putin’s Russia not only hacked political organizations in the United States but also tried to tip the election to Donald Trump, who was perceived to be friendlier to Russia. If true, Russia has gone too far.

True, the righteous indignation by the United States that a foreign power was trying to meddle in the results of its election might be regarded as hypocritical by most of the world. The United States has been regularly interfering in other countries’ politics since World War II.

In fact, it overthrew democratically elected governments in Iran, Guatemala, the Dominican Republic and Chile. And in fact, Putin witnessed US “democracy building“ in Russia’s sphere of influence during the anti-Russian revolutions in Georgia and Ukraine. His intrusion into the US election may have been motivated by revenge for what he believed was Hillary Clinton’s alleged encouragement of anti-Putin protests in 2011 by saying Russia’s parliamentary elections were neither free nor fair.

If the United States wants other nations to refrain from intervening in its elections, it must stop future interference in their political systems.

Nevertheless, Russia must face some retribution for its brazenness. The US response should be measured, confined to the cyber arena, and initiated before President Obama leaves office.

Certainly no military action should be taken against the only nation with enough nuclear weapons to erase the United States from the map. The US cyber response should be swift and robust to deter Russia and other nations from engaging in future cyber shenanigans.

Such a response should not, however, preclude the incoming Trump administration from fostering better relations with Russia. No requirement should exist that countries be democracies to have good relations with the United States. In fact, the United States might just need Russia’s help in countering Islamist terrorism and a rising China.