Like many small countries, Azerbaijan finds its freedom of action on the diplomatic stage constrained by powerful neighbors. Pressure from Russia in the north is rising–pressure to curtail growing ties to the West, including a nascent relationship with NATO and openness to Western investment. But pressure from Iran in the south is easing. Iran seems to have scaled back its support for Islamists in Azerbaijan and moderated its rhetorical attacks on Azerbaijan’s Western ways. Perhaps as a result, President Haidar Aliev once again plans to visit Tehran, restoring to the calendar a trip that was canceled last year due to Aliev’s ill health.

Iran is more than a large neighbor. An Azerbajani province called Nakhichevan borders Iran but is cut off from the rest of Azerbajan by a swath of Armenian territory. Nakhichevan has closer economic ties to Iran than it does to Azerbaijan. But ethnic ties run the other way. Northern Iran, the area around Tabriz, has a very large Azeri population, but few Persians live in Azerbaijan.

The agenda for a summit in Tehran is long. Iran like Russia disapproves of Azerbaijan’s tilt toward the West, including Aliev’s overtures toward the informal Turkey-Israel-United States grouping. And Iran in particular disapproves of the proposed Baku-Ceyhan pipeline, which would take Caspian oil and gas across Azerbaijan and Georgia to the Black Sea, and then across the Black Sea to a Turkish pipeline that ends at the Mediterranean port of Ceyhan. The Iranians propose instead to bring Azerbaijan’s Caspian oil to refineries in northern Iran, with Iran selling an equal amount of Iranian oil into Persian Gulf markets for Azerbaijan’s account. Azerbaijan points out that though the route to northern Iran is shorter, easier, and cheaper, the swapping arrangement would limit Azerbaijan’s exports to the capacity of Iran’s refineries.