Pakistan responded by announcing the withdrawal of its ambassador.
The attacks, targeting diplomats from Bahrain as well as Pakistan, came three days after gunmen seized Egypt's top envoy to Iraq as he was buying a newspaper in the capital. The Egyptian envoy is still being held.
Insurgents were hoping to sow a climate of fear and send a message "to the Arab countries not to open embassies in Iraq and to prevent security, economic and political overtures to Iraq," said Abbas al-Bayati, a member of the parliamentary foreign relations committee.
A total of 49 countries or entities have some form of diplomatic representation in Iraq, including 18 Arab or non-Arab Muslim countries, according to Iraq's Foreign Ministry and country Web sites.
In an audiotape on the Internet, the leader of al-Qaeda in Iraq, Abu Musab al-Zarqawi, reportedly said the Iraqi army is as great an enemy as the Americans and announced the formation of a new terror command to fight Iraq's biggest Shia militia.
The comments appeared aimed at discouraging armed Iraqi groups from entering talks with the Iraqi government.
"We announce that the Iraqi army is an army of apostates and mercenaries that has allied itself with the Crusaders and came to destroy Islam and fight Muslims. We will fight it," the speaker said.
It was impossible to determine whether the speaker was al-Zarqawi, although the voice sounded like ones on tapes US officials have acknowledged were made by the Jordanian-born terror mastermind.
Also Tuesday, a US soldier was killed and two were wounded by a roadside bomb northeast of Baghdad, the US military said. At least 1,745 members of the US military had died since the beginning of the Iraq war in March 2003, according to an Associated Press count.
Early Wednesday, gunmen in west Baghdad killed a police captain who worked as chief bodyguard for a consultant to former Prime Minister Ayad Alawi, police said.
US soldiers captured four suspected insurgents in Baghdad who belonged to a kidnapping ring, the military said Wednesday. No hostages were found.
Bahrain's top envoy in Iraq, Hassan Malallah al-Ansari, was slightly wounded as he drove to work in the Mansour district, hospital and Bahraini officials said. Bahraini officials said they believed it was a kidnap attempt.
Pakistan's Ambassador Mohammed Younis Khan escaped injury later Tuesday when gunmen in two cars fired on his convoy in a kidnap attack in the same district, security officials said.
Both envoys would leave the country temporarily, their governments said after the attacks.
"Our escort fired back at them so we were able to escape without any harm," Khan told The Associated Press.
A Web statement Tuesday claimed responsibility in the name of al-Qaeda in Iraq for the kidnapping of Egyptian diplomat Ihad al-Sherif.
It marked the first time the group claimed responsibility for kidnapping a diplomat. Al-Qaeda in Iraq, considered one of the most fearsome militant groups in the country, has killed several foreign civilians and contractors that it abducted in the past, often releasing gruesome videos showing their beheadings.
The statement made no threat to kill the diplomat and
Last month, Egypt became the first Arab nation to respond to US calls for Iraq's neighbors to upgrade their diplomatic missions in Baghdad. Pakistan and Bahrain are among America's closest allies in the Muslim world and in the global campaign against terrorism.
Two Russian Embassy cars came under fire on the Baghdad airport road Sunday, the Interfax news agency reported in Moscow. Interfax quoted Foreign Ministry spokesman Alexander Yakovenko as saying the gunfire "was not aimed specifically at the Russian Embassy cars, but was scattered."
The diplomat attacks occurred as Iraq's government made overtures to Sunni Arabs, who largely boycotted the January 30 election and who form the backbone of the insurgency.
The mostly Shia and Kurdish committee drafting a new constitution accepted 15 Sunni members Tuesday after weeks of haggling.
Sunni participation in preparing the new constitution is considered essential in undermining support for the insurgents. Sunnis form about 20 percent of Iraq's 26 million people but are the majority Muslim sect throughout the Arab world.
Iraq also must win widespread acceptance among its Islamic neighbors to develop as a stable and prosperous society.
About a dozen Arab and other Middle Eastern countries maintain diplomatic relations with Iraq, although relatively junior diplomats lead most missions. Arab governments fear upgrading representation would be seen as an endorsement of the US military presence, widely opposed in the Middle East.
Al-Sherif was sent to Baghdad on June 1 as a step toward appointing a full ambassador. Last week, Syria, which has only an interests section in Baghdad, sent a delegation to Iraq to discuss reopening an embassy. Results of that visit were unknown.
Despite such progress, tension has arisen between some Arab countries and Iraq over issues such as support for the insurgency or negotiations with militants.
Iraq and Jordan tangled when Amman expressed concern about Shia dominance in the region and Baghdad complained that Jordan wasn't doing enough to stop insurgents from entering Iraq. After anti-Jordanian protests, Amman removed its top diplomat from Baghdad in March.
The Iraqis also are suspicious that Sunni-led Arab countries maintain backchannel contacts with Sunni Arab insurgents. On Tuesday, Iraqi government spokesman Laith Kuba suggested al-Sherif may have been abducted while on his way to meet with insurgents.
"The fact that he went out without security may have been because he was on his way to make such contacts," Kuba told reporters. "The only recommendation is that contacting these armed groups is dangerous and has repercussions."
In other developments Tuesday:
Two suicide car bombers wounded four U.S. Marines in the western town of Hit, a US spokeswoman said.
Gunmen ambushed a minibus taking seven Baghdad airport employees to work, killing four women, police and hospital officials said.
A roadside bomb blast and subsequent firefight killed two Iraqi soldiers on Baghdad's outskirts, police and hospital officials said.
(Associated Press writers Sadaqat Jan in Islamabad, Pakistan, Salah Nasrawi in Cairo and Mariam Fam, Qassim Abdul-Zahra and Sinan Salaheddin in Baghdad contributed to this report.)