BEIRUT, Lebanon — A double bombing struck the Iranian Embassy compound in Beirut on Tuesday, in the deadliest assault on Iran’s interests since it emerged as the most forceful backer of the Syrian government against an armed insurgency. The frontal attack struck a symbol of the country’s powerful influence in Lebanon and neighboring Syria.

The Abdullah Azzam Brigades, an offshoot of Al Qaeda that operates in Lebanon, claimed responsibility for the bombings, which killed at least 23 people, including an Iranian diplomat. Syria, Iran and Hezbollah, the Lebanese militant organization, pointed fingers at Israel and Saudi Arabia, and officials said it was unclear who had carried out the attack. Regardless, it was quickly seen as retaliation against Iran and Hezbollah, Iran’s ally, for supporting the Syrian government.

The double bombing highlighted the risks and costs that Iran faces over Syria, which some analysts have called Iran’s Vietnam. Others say Iran has successfully turned its support for Syria’s president, Bashar al-Assad, into a powerful international trump card that strengthens its hand in negotiations over its disputed nuclear program.

The morning attack occurred at a complex time for Iran. While the country’s support for Mr. Assad drains its popularity in much of the Arab world, a new, relatively moderate Iranian government seeks to transform its long-strained relations with the West. Iran is seeking to end crippling economic sanctions and reach an international deal on its nuclear program, which the United States and Israel say is aimed at making a nuclear bomb and which Iran says is for peaceful purposes.