The National Security of Azerbaijan had prevented a plan by a radical Islamic group for a "large-scale terror attack" against the U.S. Embassy and government buildings in oil-rich. One suspect was killed.
The group included army lieutenant Kamran Asadov, who had stolen 20 hand grenades, a machine gun, four assault rifles and ammunition from his military unit and made them available for the planned attack, the ministry said in a statement.
It did not name the group, but said they were adherents of the strict Wahhabi interpretation of Islam.
The British Embassy in Baku closed temporarily and the U.S. Embassy scaled back its operations in response to the threat.
Security forces tracked down the group and arrested several of its members during a sweep Saturday in the village of Mastaga about 30 kilometers (20 miles) northeast of Baku. One member of the group offered resistance to the arrest and was killed, the statement said.
"That prevented a large-scale, horrifying terror attack that was being prepared by members of this group against several state structures in Baku and embassies and missions of the countries which are members of the international anti-terror coalition," the ministry said in a statement.
National Security Ministry spokesman Arif Babayev told The Associated Press that targets included the U.S. Embassy.
The embassy sent out an announcement to U.S. citizens saying it had closed its consular office for an indefinite period because of a security threat and said it encouraged Americans to "maintain a high level of vigilance."
Police cars were parked outside the embassy.
In Washington, the U.S. State Department said the plot was directed at individuals in or near the embassy.
Spokesman Sean McCormack said the embassy, in cooperation with Azeri officials, had strengthened security and the mission would likely re-open soon.
The British Embassy closed completely on Monday, according to a receptionist in the Landmark building where the embassy is located. No one answered the phone at the embassy.
Several offices in the Landmark building also shut down operations Monday, including included Norway's StatoilHydro ASA and BP Azerbaijan, the receptionist said.
Hidayat Orujev, the head of Azerbaijan's state agency in charge of dealing with religious groups, hinted at a possible foreign involvement in the plot, saying that "groups aiming to upset religious stability in Azerbaijan had been guided from abroad."
The Wahhabi strain is followed by Osama bin Laden and many al-Qaida members.
Rafiq Aliyev, the head of the Center for Islamic Studies, told The Associated Press that Wahhabi groups in Azerbaijan could become more active in the run-up to a presidential vote in the fall of 2008. "Such groups serve as a tool for outside forces which want to disrupt stability," he said.
Russian President Vladimir Putin, in his speech dedicated to the Day of the Russian Navy, recalled the threats that Russia is currently facing from a number of countries.