The choice of Baku last year reflects Iran's influence, said Matthew Levitt, a former intelligence chief at the U.S. Treasury Department. He described the alleged plot as "in the advanced stages."
"The Iranians have a history of a presence there," said Levitt, who is now at the Washington Institute for Near East Policy. "And they wouldn't mind undermining the country, given Azerbaijan's Western leanings."
Azerbaijan, a moderate Muslim nation of 8 million, finds itself in a delicate spot. It has strong commercial and diplomatic ties to Iran, on its southern border. About a quarter of Iran's population, including supreme leader Ayatollah Ali Khamenei, are ethnic Azeris.
At the same time, the Azerbaijani government has a good relationship with Israel and Western nations, which have helped develop an oil pipeline originating in Azerbaijan and running through Georgia to the Turkish port of Ceyhan.
Baku has accused Tehran of interfering in its affairs. In 2006, 15 Azeris were charged with plotting violence against Israelis and Westerners with training and direction from Iranian security forces.
That case resulted in surveillance that contributed to the discovery of last year's plot, Western anti-terrorism officials say. In early 2008, security forces detected contact between local militants and two Hezbollah operatives, said Western officials familiar with the investigation.
The Lebanese suspects on trial are Ali Karaki, whom anti-terrorism officials describe as a veteran of Hezbollah's external operations unit, and Ali Najem Aladine, described as a lower-ranking explosives expert.
The duo allegedly traveled back and forth from Baku to Iran and Lebanon in early 2008. They used Iranian passports, stayed in luxury hotels and led a cell that laid the groundwork for an attack, anti-terrorism officials say.
The cell allegedly conducted reconnaissance on the Israeli Embassy, which is housed in the Hyatt Tower high-rise complex along with the Thai and Japanese embassies. The group cased other targets, developing plans to bomb a radar tower, prosecutors say.
The Azerbaijani investigation concluded that the suspects intended to array three or four car bombs around the embassy and set them off simultaneously. The group had hundreds of pounds of explosives, allegedly supplied by Iranian spies, and intended to accumulate more, said the officials familiar with the investigation.