Iran's armed forces joint chief of staff General Hassan Firouzabadi said Azerbaijan might face a "people's awakening" for suppressing Muslims and maintaining ties with Israel, the state-run Fars news agency reported.
President Ilham Aliyev risks a "dark future" for ignoring the demands of the Azeri people and allowing Israel to meddle in the nation's affairs, Firouzabadi said.
Aliyev, who took over from his father in 2003 in the first dynastic succession in a former Soviet republic, has faced protests from religious activists opposing a ban on Islamic headscarves in schools. Azerbaijan maintains diplomatic relations with Israel, which is one of the main suppliers of weapons to the Caspian Sea nation.
Azeri officials have accused Iran of trying to stir up Islamic protests to weaken Aliyev. Movsum Samadov, leader of the outlawed Islamic Party, is standing trial in the capital, Baku, on charges of attempting to topple the secular government. Samadov, who is accused of having ties with Iran, was arrested in January after condemning a ban on the hijab in schools and calling for the overthrow of Aliyev's government.
Iran's Shiite religion is shared by two-thirds of Azerbaijan's 9 million inhabitants. Almost a quarter of Iran's 75 million people are ethnic Azeri.