NEW BOSS: Lt. Gen. David Rodriguez (left), the No. 2 in command, greets Gen. David Petraeus at the Kabul airport yesterday.EPA

KABUL, Afghanistan — On the same day that Gen. David Petraeus arrived to assume command of US and international forces in the country, Taliban suicide attackers stormed a four-story house used by an American aid organization in north Afghanistan yesterday, killing four people before dying in a fierce, five-hour gun battle.

The predawn attack appeared part of a militant campaign against international development organizations at a time when the United States and its allies are trying to accelerate civilian aid efforts to turn back the Taliban.

Petraeus — replacing Gen. Stanley McChrystal, who was fired by President Obama — arrived from Brussels, where he sought to reassure allies that the war against the Taliban was on track despite rising casualties and problems regaining control over key parts of the country.

Insurgents began their attack in Kunduz at 3:30 a.m. A suicide car bomber blew a hole in the wall around a building used by Development Alternatives Inc., a global consulting company based in the Washington, DC, area on contract with the US Agency for International Development, or USAID. The company is working on governance and community-development issues in the area.

At least five other attackers, all wearing explosive vests, then ran inside the building, according to Afghan police and army officials. The insurgents killed or wounded security guards and others before dying themselves in a gun battle with Afghan security forces who raced to the scene.

“It was 3 o’clock in the morning, close to the morning prayer time, when a suicide bomber in a 4-by-4 vehicle exploded his vehicle,” Gen. Abdul Razaq Yaqoubi, police chief in Kunduz province, said as Afghan national security forces were still battling to kill the last surviving attacker. “There is no way for him to escape.”

One British, one German and two Afghan nationals were killed, according to a statement issued by DAI in Bethesda, Md. They all worked for DAI’s security subcontractor, Edinburgh International, DAI said. Several other people, including two members of the DAI staff, were among those injured.

Steven O’Connor, communications director for DAI, said three DAI employees — two Americans and one Serb — were in the building at the time of the attack. It was unclear if they were among the wounded.

Insurgents have been carrying out attacks in recent months against organizations and individuals seen as cooperating with the Afghan government and donor nations just as the international community is trying to help the government of Afghan President Hamid Karzai extend its reach deeper into the provinces.

“They don’t want the people of Afghanistan to have a prosperous life,” Karzai said, condemning the attack.

The United States called it a cowardly attack on civilians working to improve conditions in the nation.

“This is another tragic reminder of the life-threatening circumstances that our Afghan and international partners face every day as they work side by side with the Afghan government and its people to improve conditions in the country for a better future,” according to the joint statement issued by USAID and the US Embassy in Afghanistan.