Why Azerbaijan is closer to Israel than Iran
First of all, you need to ask for an appointment well in advance. Security agents call your head office to make sure you are who you say you are.
If your credentials check out, an appointment is made, and a guard escorts you to the top floor of the building. Another guard calls you in, tests your equipment and ask you to leave behind your mobile phone. You are taken through further checks and invited to sit in a corridor and admire works of art on the wall as you wait.
Then, just a few minutes behind schedule, one of the most fortified men in the Caucasus region arrives for his interview.
Michael Lotem is Israel's Ambassador to Azerbaijan. His embassy is the closest that Israel physically gets to its principal enemy, Iran. From the embassy it is only a four-hour drive south to the Iranian border.
The Israeli embassy in Baku is an important, and occasionally a dangerous, outpost. In January 2012, Azerbaijan's government said it broke up an Iranian plot to kill the ambassador.
"I can tell you that the Iranians don't sit still for a second," says Mr Lotem slowly, as he fiddles with his shirt sleeve. "But I'm not worried about my security. I have full confidence in the Azeri security services."'More Tel Aviv than Tehran'
Israel and Azerbaijan have had diplomatic relations since April 1992, six months after the republic declared its independence from the Soviet Union.
Israel and the secular government of Azerbaijan share the same goal: to check the spread of political Islam in general and Iran in particular.
Theirs is an alliance reinforced by hardware. In February 2012, Israel sold Azerbaijan $1.6bn (1.3bn euros) of sophisticated weapons systems.
"We share the same view of the world, I guess," says Michael Lotem. "We share quite a few common problems. For us Israelis to find a Muslim country which is so open, so friendly, so progressive, is not something the Israelis take for granted."
Earlier this year, America's Foreign Policy magazine suggested the alliance between Israel and Azerbaijan went deeper than many had previously thought.
The magazine reported that Israel had secured an agreement to use Azerbaijan's airfields in case it went ahead with a military strike against Iran's nuclear facilities.
If true, this would give Israel a significant tactical advantage. But Israel denies the claim.
"That's sheer science fiction", says the ambassador, "or maybe we should drop the science out of it. The aim is having very solid relations with Azerbaijan."
Azerbaijan's population is mostly Shia Muslim. But its government is intensely secular.
A lone shop in the centre of Baku, called simply The Muslim Shop, shows how rare the public expression of Islam is in the capital.
In the evenings, restaurants serve Turkish-made beer to customers in Fountains Square. Most women do not wear headscarves. The centre of town has a McDonalds, a Mothercare and a Versace shop. Baku feels more like Tel Aviv than Tehran. The government is determined to stop its Islamic neighbour from encroaching.
"Azerbaijan naturally rejects the Iranian Islamic influence because it is perceived as a threat to the very nation state," says Leila Alieva, the Director of the independent Centre for National and International Studies in Baku.
"On the other hand, Azerbaijan has always enjoyed a very good relationship with the Jewish community."Strike 'disastrous'
But there are those in Azerbaijan who disagree with their government's embrace of Israel.
Ilgar Ibrahimoglu is an Islamic cleric who campaigns for a greater role for Islam in Azerbaijan.
End Quote Elman Abdullayev Foreign Ministry spokesman
We develop our relations with different countries based on our national interest - be it Israel, be it Muslim countries”
He works from a small office and prayer room in Baku. Guests are invited to take off their shoes when they enter in order to respect Islamic custom.
Mr Ibrahimglu enters the room, sits behind a desk and warns that previous journalists have made him look stupid. So he says that he will speak in short sentences, perhaps conscious that Azerbaijan's government will keep a close eye on his words.
"Iran is a Muslim country and a close neighbour of Azerbaijan", he says, "but I won't say more. Even if this was a live interview I'd say the same thing for five hours straight."
But when the staccato conversation turns to Israel, the cleric decides to loosen his rules and speak slightly more expansively.
"Azerbaijan shouldn't be friendly with a country that carries out state terror against another people, the Palestinians. Israel can't beat Iran. It couldn't win in Gaza or Lebanon, and it won't win in Iran."
The cleric's words won't make Azerbaijan switch alliances. In May 2012, two Azerbaijani poets were detained in Iran on charges of espionage. Azerbaijan's government has since advised its citizens not to travel to the Islamic Republic.
Elman Abdullayev, a Foreign Ministry spokesman, deals with Iran every day. He studied in California, and bounces from foot-to-foot as he talks.
He apologises for the renovations being made to the Ministry's Soviet era building (the apology is prompted when we pass a man who accidentally pulls a door off its hinges.)
"Azerbaijan has always been famous for its modernistic approach - for its secularism." Mr Abdullayev says. "You know we have been first secular state in the Muslim East. So we develop our relations with different countries based on our national interest - be it Israel, be it Muslim countries."
Mr Abdullayev rejects the reports that Azerbaijan might lease its airbases to Israel. But what would his government do if its ally, Israel, strikes its neighbour, Iran?
"This a hypothetical question which would be difficult to answer," he says. "We think that the Iranian issue has to be resolved diplomatically, peacefully, politically, because anything like that [a military strike] would be disastrous for the whole region, for all of us."Iranian suspicions
Relations between Azerbaijan and Iran are made more difficult because they share not just a border, but a common heritage.
The Azeri people once lived under the Persian Empire. In 1813, the Treaty of Gulistan after the first Russo-Persian war split the ethnic Azeri people into two.
Those in the north lived under Russian, then Soviet rule - and are now in independent Azerbaijan. Those in the south lived under the Persian Empire - and are now in the Islamic Republic of Iran.
Today, around nine million ethnic Azeris live in Azerbaijan. But even more ethnic Azeris live across the border in Iran. Figures show that there are around 10-20 million Azeris in Iran - around a fifth of the country's population. Millions more Iranians have Azeri ancestry, including Iran's Supreme Leader Ayatollah Ali Khamenei.
Among many Azeris there is a desire for reunification.
Simon Aruz is an ethnic Azeri from Iran. He worked as a writer and political activist and campaigned for better rights for the Azeri people in the Persian State. In 2009, he fled the country for Azerbaijan.
"We used to live under pressure in Iran," he says. "We are always thinking about our brothers, our sisters, our family. I hope they can be free soon. "
Such words make Iran suspicious. The government of the Islamic Republic is concerned that Azerbaijan wants to steal both land and people - a charge denied by Azerbaijan's government. The tensions of a shared, divided heritage are now magnified by the different ways in which each government sees the world.Border tension
The overnight train from Baku to the southern border town of Astara leaves at 11pm and makes its way slowly south, along the coast of the Caspian Sea. Some travellers fall asleep immediately. Others drink and listen to the chorus of frogs outside.
"Ask me anything about the Iranians," says one man who says he is travelling to Astara simply to drop off a music CD with friends. "I know them better than they know themselves."
Early in the morning, the train arrives in Astara. My colleagues and I take a taxi to see the Iranian border. We stop at a gap in the trees half way up a hill.
A group of Polish tourists is already standing by the fence. They are in Azerbaijan to watch a Europa League football match - and happily pose for photos with Iran as their backdrop.
The Islamic republic is just on the other side of the fence. Houses with white walls and red roofs are clearly visible across the valley. Cars in northern Iran head towards the border crossing with Azerbaijan.
The Polish tourists head off to watch their match. After a few minutes the security forces arrive and order my colleagues and me to accompany them to their base.
They inspect the TV pictures we have filmed which show little more than the fields of northern Iran and order us to delete the footage.
They explain that broadcasting the pictures would get them into trouble - they say that they do not want to do anything to increase tension with their Islamic neighbour. The commander, a vocal Wayne Rooney fan, finally drops us off at a hotel in Astara.
At the border crossing itself, crowds of Azeris load up their cars with boxes of food and sweets. Day-to-day goods cost less across the border in Iran. One woman has brought back soap, bananas, biscuits for her grandchildren.
"We are going to Baku," says Ali Mani, a carpet merchant from Iran. "Our friends invited us. There are some restrictions in Iran that we don't see here. It's interesting here.
"We haven't any problem with Azerbaijan and I know Azerbaijan language," adds his friend in English.
Our interpreter asks them in Azeri if they would like to talk about Iran and Israel. They say no, and also decline to have their picture taken.
Next to the border gate, a driver called Ismail stands next to his car. His 23-year-old son is slumped in the front seat, trying to hide from the sun, barely able to move. The two are returning from a trip to hospital in Tehran.
"My son was having treatment here in Azerbaijan but it wasn't doing anything," Ismail says. "The doctors didn't say what his problem was. That's why some people advised me to go to Tehran.
"We went there, they carried out a stomach operation and it was successful. My attitude [towards Iran] is very positive. I went there with big hopes - for my son to be cured there. It was successful. So I'm happy."
Ismail says that his son's operation cost $6,000. He has paid a first instalment to the Iranian hospital and has promised them he will pay the remainder.
Azerbaijan and Iran share both history and mistrust. Their network of competition draws in both the Caucasus and the Middle East.
But for those Azeris on the border Iran is more simple and more immediate. It is a cheaper place to shop, and the only hope to save a son's life.