Security services in Azerbaijan have said they arrested 40 suspects and seized weapons as they thwarted a series of planned attacks against the Eurovision Song Contest.
Targets included the song contest venue and major hotels housing foreigners, the National Security Ministry said in a statement on Wednesday.
Azerbaijan has in recent months reported being the target of "terrorist activities" planned by groups with ties to al-Qaeda and Iran.
An oil-rich nation of 9 million people wedged between Russia and Iran, Azerbaijan's close relations with the United States has placed a strain on its ties with Iran.
Wednesday's statement said other plots included plans for an assassination attempt on President Ilham Aliyev in April, as well as attacks on religious pilgrimage sites and police stations.
The statement provided no details on when the arrests took place.
"The armed group set itself the aim of mounting terrorist attacks in several regions of Azerbaijan, creating a mood of powerlessness and lawlessness, sowing panic, ethnic and religious enmity, disrupting the public peace and damaging Azerbaijan's international image," the statement said.
At least one suspected plotter, 37-year-old Azerbaijani citizen Vugar Padarov, and a security agent were killed during raids to shut down the terrorist group, it said.
Padarov was identified in an April security statement as the leader of a group that had received religious training in Syria. Some of its members had weapons training with a group in Pakistan and took part in fighting NATO-led troops in Afghanistan, the national security ministry said.
In March, the ministry announced the arrests of 22 Azerbaijani citizens it said had been hired by Iran to stage terror attacks against the US and Israeli embassies as well as against Western-linked groups and companies.