Kidnappers said Thursday they had killed Egypt's top diplomat in Iraq, Ihab Sherif, who was abducted six days ago in Baghdad as part of a declared effort by insurgents to seize a large number of envoys.

The Egyptian government confirmed the killing, which was reported in a posting on a Web site, purportedly by the insurgent group al Qaeda in Iraq. The statement said that "the judgment of God Almighty on the ambassador of the apostates, the ambassador of Egypt, has been consummated with the praise of God."

In another development, Iraqi officials said Thursday they had signed an agreement with Iran to receive military training for their fledgling armed forces, a function that has been supervised by the United States.

The Egyptian envoy, in a video posted Thursday on the Internet, was shown wearing a blindfold and heard identifying himself as holding "an ambassador's rank in the Egyptian Ministry of Foreign Affairs. I worked as an assistant to the deputy foreign minister for Arab Middle East affairs from 1999 to 2003, including a year as a deputy ambassador in Israel."

Al Qaeda in Iraq has claimed responsibility for some of the deadliest attacks in Iraq's two-year-old insurgency and for kidnapping and killing several foreigners. Many of those kidnapped have been beheaded, and video images of their executions have been posted on the Internet. The video showing Sherif, however, did not show the envoy being killed.

Sherif, 51, came to Baghdad on June 1 and was to have become the first ambassador from an Arab country accredited to the new Iraqi government of Prime Minister Ibrahim Jafari. He was last seen Saturday night before leaving his house to buy a newspaper. His four-wheel-drive vehicle was found Sunday, and on Tuesday, al Qaeda in Iraq claimed that it had kidnapped him.

In its statement, the insurgent group said it intended to kidnap other envoys to deter countries from strengthening diplomatic ties with Iraq. Gunmen on Tuesday tried to kidnap two other diplomats from Muslim countries, Mohammed Younis Khan, Pakistan's ambassador, and Hassan Malallah Ansari, Bahrain's charge d'affaires.

In its statement, al Qaeda in Iraq said it had chosen the Egyptian as its first target because Egypt was "the first to obey the crusaders and disobey God by sending the first ambassador to the government of the traitors. It was the first regime that agreed to train the pro-crusaders police and army personnel. But your brothers in the Qaeda organization are continuing killing and fighting all those who collaborate with the Jews and Christians, those who stood by their ranks, and fought against God."

The killers noted that the government of Egyptian President Hosni Mubarak had waged a running battle with Islamic underground groups. Recurrent Egyptian crackdowns drove many suspected militants and their sympathizers into exile, including to Afghanistan and Europe. "The Egyptian regime is one of the first to launch war on Islam and Muslims, for several decades," the statement said.

In Cairo, the Egyptian government issued a statement expressing "deepest sorrow for the loss of one its finest sons and a martyr of her diplomatic service who lost his life at the hand of terrorism that trades in the name of Islam but which knows no nation nor faith."

The statement suggested that Egypt would not pull back from its diplomatic support for the Iraqi government. "This terrorist act will not thwart Egypt from its unwavering policy of supporting Iraq and its people," the statement said.

Since Jafari's Shiite Muslim-led government was formed at the end of April, Iraqi officials have been eager to strengthen ties with other nations. Iran's defense minister, Rear Adm. Ali Shamkhani, called the pact to train the Iraqi military "a new chapter" in relations between the two countries, which fought a brutal war from 1980 until 1988 in which an estimated 1 million people were killed.

Iraq's troops are currently being trained under the direction of the U.S. military. U.S. military spokesmen in Baghdad and Lt. Gen. David H. Petraeus, who is in charge of the training program, declined to comment on Iraq's deal with overwhelmingly Shiite Iran, which the United States has accused of sponsoring terrorism and of attempting to develop nuclear weapons.

Asked whether the accord might anger officials in Washington, Defense Minister Sadoun Dulaimi said, "Nobody can dictate to Iraq its relations with other countries," the Reuters news agency reported.

Correspondent Daniel Williams in Cairo and special correspondents Khalid Alsaffar and Omar Fekeiki in Baghdad contributed to this report.

Egypt's top diplomat in Iraq, Ihab Sherif, is shown in a video Internet posting. The group al Qaeda in Iraq asserted responsibility for his killing.