At least 45 people were killed Sunday in violence in Iraq, including 29 in two attacks in the capital: a suicide bombing at a military recruiting center and a massacre of a sleeping family in a residential neighborhood.

The Baghdad bombing occurred just before 9 a.m. at Muthanna airport, a former government airstrip near the city center that has been converted into a facility for processing army recruits. According to witnesses and police, a bomber detonated an explosive belt near a crowd of men waiting to enter the recruiting center.

According to the Defense Ministry, the explosion killed 21 people and wounded at least 34 others, which would make it the deadliest bombing in Baghdad since June 19, when a suicide bomber killed 23 people in a restaurant popular with Iraqi policemen. Medical workers quoted by news services put the death toll in Sunday's attack between 16 and 25 people.

The entrance to the recruiting center, on busy Damascus Street across from Baghdad's Thawra Park Zoological Gardens, has frequently been the target of attacks. Authorities erected blast walls along the sidewalk to protect would-be recruits waiting to pass through the main gate, and police said Sunday that applicants were only allowed to go behind the blast walls -- usually in groups of 10 at a time -- after they had been thoroughly searched. But witnesses said the bomber who struck Sunday evaded the extra security by slipping between barriers.

"He used a small gap between the concrete blocks to infiltrate in," said Hussein Nasir, an Iraqi soldier who was keeping onlookers away after the blast by firing warning shots into the air. Nasir said a solider in a guard tower had spotted the bomber slipping through the barrier and shot at him, wounding him but not preventing him from detonating his charge. Police said they had no information indicating the attacker had been shot.

Amir Ibrahim, a park policeman who was across the street at Thawra Park at the time of the attack, said that the bomber apparently had not been in the crowds of men waiting to be searched and suggested that he may have been driven to the recruiting center and dropped off at the gap in the blast walls.

Both Ibrahim and Nasir said the recruiting center has been attacked eight times. The army's move to add blast walls and conduct searches made the facility safer, Ibrahim said, "but it is hard to stop these suicide bombers like this. The insurgents can't use car bombs anymore because of the security procedures, so they start using this new strategy."

Though insurgents have made Iraq's fledgling security forces a principal target in their campaign of violence against the Iraqi government and its foreign supporters, the army and police continue to attract recruits in a country where jobs are scarce.

"We did not do anything wrong," said Ali Salim, 22, who said he had come looking for a way to support his family and had been in the park across the street when the bomb detonated. "I was going to become a soldier to defend my country. I will not become a spy for the Americans, so why do they want to kill me?"

Across Baghdad, in the eastern neighborhood of Baladiyat, police found the bodies of eight people -- all members of the same family -- who apparently had been shot overnight as they slept. The victims, all Shiite Muslims, included a woman, two of her daughters and her 2-year-old son, relatives said. A ninth family member survived the attack but was hospitalized with gunshot wounds, police said.

Sectarian violence has been rife in Iraq since a Shiite-led government took office in late April, but police said that the motive for these most recent killings was not immediately clear and that an investigation was underway. A cousin of the victims said he thought the massacre was the culmination of a sectarian dispute that began with an argument over a cell phone.

Ghanim Khadum Darraji, 36, said a young male cousin who was among those killed had been ridiculed four months ago by a local barber because the ring tone on his cell phone was a Shiite chant and the video screen displayed the image of Imam Hussein, the grandson of the prophet Muhammad whose martyrdom in the 7th century was a defining moment in the history of Shiite Islam.

"Four days later, the barber was dead and his tribe accused us of killing him," recalled Darraji, who said the barber was from a prominent Sunni Muslim tribe from the western province of Anbar. Darraji said his relatives had told the slain barber's tribesmen that they were innocent, and that the tribesmen later agreed, saying they had found the real killer. "We thought everything was over," Darraji said.

At about 10 a.m., police responded to a call from another relative who had knocked at the gate to the family's home and became worried when no one answered. Inside, they found the eight bodies and one survivor, all still in their beds, they said. There were no signs of a struggle.

In other violence Sunday, two suicide car bombers killed at least seven Iraqi customs officials at the Walid crossing point on the Iraqi-Syrian border, the U.S. Marines said in a statement. The crossing, one of three along the long border, was closed after the attacks.

Near Mosul, a police patrol was struck in a suicide car bombing, according to a statement from the U.S. military's Task Force Freedom, which has security responsibility for northwestern Iraq. Five Iraqi police officers were killed and three were wounded. And in Kirkuk, four people were killed and 14 wounded when a suicide car bomber attacked a convoy carrying the head of the city council, Jamal Shakoor. Police said Shakoor survived the explosion, which damaged surrounding buildings and shook a nearby hospital.

Meanwhile, the killing of a veteran Egyptian diplomat by insurgents in Iraq continued to stoke tension between Egypt and Iraq, as each side blamed the other for the envoy's death.

Egypt's foreign minister, Ahmed Aboul Gheit, reacted angrily to weekend remarks by Iraqi government spokesman Laith Kubba, who told reporters in Baghdad that Ihab Sherif was trying to contact insurgents when he was kidnapped and later killed.

"The fact that he went out without security may have been because he was on his way to make such contacts," Kubba said. "The only recommendation is that contacting these armed groups is dangerous and has repercussions." The Iraqi government has long suspected Arab governments of speaking independently with Sunni Muslim rebels.

In a statement issued by Egypt's Foreign Ministry, Aboul said Kubba's remarks were aimed at "avoiding responsibility or just spreading rumors and justifying a tragedy." The statement said an assistant foreign minister in charge of Arab affairs was asked to take up the remarks with Iraqi diplomats in Cairo.

Opposition politicians in Egypt criticized the government for sending Sherif to Iraq and said it was done to ease U.S. government pressure aimed at political reform in Cairo. "Our government is to blame for the murder of this innocent man. The government woos the Americans in order to end pressure regarding the issue of democracy," said Mamdouh Qenawi, leader of the small Constitutional Social Liberal Party.

Correspondent Daniel Williams in Cairo, and special correspondents Bassam Sebti in Baghdad and Marwan Ani in Kirkuk contributed to this report.

Iraqi police and military units and U.S. troops arrive on the scene of a suicide bombing outside an Iraqi army recruitment center in Baghdad, the capital. An Iraqi man is pulled back as he cries over the body of one of two brothers who were killed at the army facility.