The blast came at night, as six foreigners with the French aid organization Action Against Hunger were settling down and preparing for bed. There was a bright flash, a loud explosion, and suddenly the windows were shattered, throwing glass far into the house.

As the group later learned, dynamite had been thrown over the back wall of the compound and had landed in the garden, just a few yards from the house. It was pure luck that everyone was away from the windows when it exploded.

"We were attacked, but we don't know by who or why," said Olivier Franchi, program coordinator for the group in Kandahar. "Was this a random attack, or was somebody sending us a warning message? We don't know, but this is a very serious thing."

Such attacks are becoming increasingly common in southern Afghanistan, particularly here in Kandahar, the birthplace of the Taliban. In the past several weeks, a car belonging to an aid group was riddled with 16 bullets; two foreign land-mine removal specialists were slightly injured when their car hit a booby-trapped mine; Afghan workers with aid groups have been tied up and robbed; a grenade was thrown at an Afghan relief organization's car; and leaflets have been found urging locals to attack foreigners and Afghans who work with them. In neighboring Helmand province today, local officials told the Reuters news agency that unidentified gunmen attacked a security post on Friday, killing five Afghan soldiers and kidnapping two others.

"The level of violence here has increased in the past few weeks, there's no doubt," said Diane Johnson, head of the Kandahar office of Mercy Corps International, the aid group with the largest program in southern Afghanistan.

At a time when the United States and the international community are emphasizing the need to rebuild Afghanistan, many of the people working to accomplish that task say they are deeply worried about their programs and their own safety. The Afghan government of President Hamid Karzai and its supporters are especially eager to show that life can improve rapidly in the south, populated by the ethnic Pashtuns who formed the core of the Taliban Islamic movement, but that is where instability is greatest and aid programs most vulnerable.

In Kandahar, most relief groups have begun to draw down their staffs and develop contingency plans. Since almost all expect the violence to increase if the United States attacks Iraq, the talk is often of possible evacuation.

"We don't want to leave like we are panicking, because that is exactly what these people want," said Franchi, whose group was attacked on Jan. 29. "But we must also protect our staff. It is a very difficult situation."

Most of the aid workers say they believe the attacks are linked to the recent increase in combat between Islamic militants and U.S. and Afghan troops in the area. There have been battles to the southeast near Spin Boldak and in the mountains to the north, and late last month, several cars pulled up beside a U.S. military convoy heading out from Kandahar and shot three rocket-propelled grenades, all of which missed their targets.

In addition to soldiers and relief workers, Afghans have been targets. A land mine planted on a road near Kandahar blew up a minibus, killing at least eight people, and several provincial militia vehicles have been attacked and destroyed, killing several people.

Many international groups say they would have left some time ago if the humanitarian needs weren't so great. The area has not only experienced war and civil chaos for years, but has also suffered a three-year drought. Never a lush area, the region is now a uniform parched brown.

"In any other country, groups wouldn't be working here under these conditions," said Johnson of Mercy Corps International. "But this is Afghanistan, where the humanitarian needs are extreme and where everyone who comes knows there's a war going on."

Nonetheless, Mercy Corps has suspended travel to project sites outside Kandahar and is considering a reduction of foreign staff. And with a possible war in Iraq looming, Johnson said her group and most others are making contingency plans for evacuation of all foreigners.

What has increased Mercy Corps' concern is not only the attacks in Afghanistan, but also activities across the border in Pakistan. The group has a regional office in Quetta, where it recently experienced a sharp decline in attendance at some of its new health clinics. According to Mercy Corps regional director Jim White, the group learned that some mullahs had told worshipers at their mosques to stop using the services of foreign groups and that, in the sometimes fearful climate of Pakistan's border areas, the people had complied.

The security concerns are not limited to relief workers; larger infrastructure and development projects are also being affected. The Japan International Cooperation Agency, for instance, is in charge of several hospital and school projects, as well as one of the signature efforts of international donors: the rebuilding of a section of the main highway from Kabul to Kandahar and west to Herat.

But according to Tomoji Hagiwara, head of the agency's office in Kandahar, security is the group's biggest concern and will make it difficult to work outside the city. Hagiwara, who said he was speaking as an individual rather than as a spokesman for the Japanese government, which funds the agency, said that "right now, there is no way to build the road outside of Kandahar without more security." He said if a war in Iraq appeared imminent, his team of Japanese managers and engineers would leave Kandahar.

Hagiwara recently asked military officials at the U.S. air base outside Kandahar if they would supply security but was told it was probably impossible.

He and others said the security problems do not all stem from Islamic militancy. Banditry and highway robberies have increased, and foreign workers with relatively fancy cars and usually limited security make attractive targets. The threat of bandits is so great that Hagiwara said he couldn't bring money to Kandahar to pay his many Afghan subcontractors, but rather required them to travel 300 miles north to Kabul, the capital, to pick up their funds.

One group now providing relief and reconstruction services that says it definitely won't be leaving soon is the U.S. military, which is planning to bring more civil affairs officers into the Kandahar area within weeks. The military's plan is controversial among relief groups, which have expressed fear that the line between humanitarian and military work is being dangerously blurred. But the officers' presence would ensure that some rehabilitation of the area continues.

And in the event that relief groups do decide to leave the area, the military is committed to helping them get out. "We would never turn down their request for evacuation," said Maj. Greg Liska, who heads the civil-military effort here. "We would go get them if they were in trouble."

An Afghan looks at the remains of a burned bus outside the southern city of Kandahar. Attacks by Islamic militants, as well as by bandits, have become common in the area, making security a big problem for relief workers.