Russian Defense Minister Sergey Shoigu has made a rare visit to Tehran, where he and his Iranian counterpart promised "accelerated" military cooperation between the two countries.

Shoigu's visit was the first to Iran by a Russian defense minister in 15 years, and both sides played up the potential geopolitical import of the trip. "Iran and Russia are able to confront the expansionist intervention and greed of the United States through cooperation, synergy and activating strategic potential capacities," said Iranian Defense Minister Hossein Dehghan. "The visit to Tehran is a geopolitical movement towards an alliance between Russia and Iran," wrote Rossiya Segodnya analyst Aleksandr Khrolenko. "It's not just the development of military relations between the two countries, but a continuation of Russia's pivot to the East."

The two sides signed an agreement on defense cooperation, which called for joint exercises, port visits by naval vessels, and a joint fight against piracy in the Caspian. But those things were already going on, and it's not clear what new forms of cooperation might be in the works.

One big outstanding issue between the two countries is Russia's refusal to deliver S-300 air defense systems that it had earlier agreed to sell to Iran. The deal was canceled in 2010, one of the fruits of the "reset" in relations between Washington and Moscow. As a result, Tehran sued Moscow, a case that is still active. But now that the West is imposing sanctions on Russia over its conduct in Ukraine, "Iran may be thinking that the resumption of the S-300 deal may be an effective way [for Russia] to retaliate [against the West]," Russian military analyst Yury Barmin told The Moscow Times.

Iranian media reported that Shoigu and Dehghan agreed to "resolve the problem with the delivery of Russia's S300 missile defense systems to Iran," but the Russian side didn't say anything about that. One anonymous Russian expert told Interfax that "the essence of the agreement could be that Iran would drop its arbitration case and [Russia] would offer Tehran an alternative variant" to the S-300.

Iran and Russia nevertheless have a number of joint interests: aside from the broad interest in weaking Western hegemony in the world, they are among the few international supporters of the government of Bashar al Assad in Syria, and are united in their desire to reduce the West's influence in the Caspian Sea.

Iran and Russia held their most recent joint naval exercises in the Caspian in October, shortly after getting their other Caspian neighbors to sign an agreement banning "outside" military forces from the sea.

And the two countries now have something new in common: they are the subjects of international sanctions, and that could provide the impetus of a new form of military cooperation. "The Iranians have a lot to offer Russians in terms of learning to operate a military and defense industry in virtual isolation," said Ruslan Pukhov, a Russian military expert.

But there remain many other issues that divide the two sides, like disputes over the S-300 deal and, perhaps most significantly, Iran's nuclear program, says Jahangir Karami, an Iranian expert on Russian affairs: "Iran is not an ally of Russia, at least not at the current moment. And the problems Iran has with the West have nothing to do with Russia, these problems have their own history. Even with respect to Iran's nuclear program, Russia has always come out on the side of the West, and what has happened in Syria has been done mostly to put pressure on Iran, not on Russia."