This undated photograph shows Ghulam Haidar Hamidi, mayor of Kandahar city, speaking during a news conference in Kandahar. Hamidi was killed in a suicide bomb attack. (Ahmad Nadeem/Reuters)

Ghulam Haider Hamidi had been warned. Friends and relatives had for months urged the mayor of Kandahar city to leave his treacherous post and return to his quiet life as an accountant in Northern Virginia.

When his son-in-law told him this year that he was crazy to stay, Hamidi, 65, recounted a story. He had visited his home village the day before, he said, escorted by U.S. troops willing to die for Afghanistan.

“It would be shameful for me to leave Afghanistan,” Hamidi said. It was his duty to stay, he said, no matter what.

On Wednesday morning, a suicide bomber with explosives hidden in his turban killed Hamidi inside his downtown office, according to Afghan officials. His death raised to new heights the fear among Kandahar officials and served as another in a quick succession of blows this year to President Hamid Karzai’s grip on southern Afghanistan.

Insurgents have waged a killing spree in Kandahar, not in large formations to fight U.S. troops but in stealthy acts of assassination. The attacks have unraveled the governing structure and weakened Karzai’s hold on a city that was once the Taliban’s heartland and remains the nerve center of southern Afghanistan.

A suicide bomber killed Kandahar provincial police chief Mohammad Mojayed in April. Ahmed Wali Karzai, the president’s half brother, was fatally shot in his Kandahar home this month. Days later, a former governor of nearby Uruzgan province who had become a top presidential adviser, Jan Mohammad Khan, was killed in his Kabul home.

Although not all the killings have been proven to be the work of the Taliban, the group has profited by asserting responsibility and creating the impression that no one working with the government is safe.

The Taliban took credit Wednesday for Hamidi’s killing. The bomber “was one of our mujaheddin and took advantage of today’s meeting to kill the mayor,” Taliban spokesman Qari Yousef Ahmadi said in a telephone interview. “The mayor was under our surveillance, and today was a good opportunity.”

Decisions faced criticism

At the time of the blast, Hamidi was leaving his office to meet with tribal elders from a Kandahar neighborhood where two children had been killed accidentally the day before by municipality bulldozers razing houses built on government land.

The local outrage over the bulldozing reflected a controversial aspect of Hamidi’s tenure as Kandahar mayor. Amid a lethal struggle for power and access to the spoils of a wartime economy, Hamidi’s decisions earned him many enemies. As part of his campaign to boost city tax revenue and reclaim government lands from illegal businesses, he angered those he evicted or whose shops were destroyed.

Hamidi undertook what one U.S. official who spoke on the condition of anonymity called a “campaign, divorced from reality, to turn Kandahar into Fairfax” by banning illegal sidewalk vendors, bulldozing unregistered shops and evicting squatters.

His critics accused him of being a lackey for the Karzai family, helping to steer land and wealth their way at the expense of rival tribes and political opponents. In one case, Hamidi intervened to buy land owned by the Ministry of Defense and sell it to the president’s relatives so they could develop it into a sprawling gated community of modern homes and fountains. Hamidi insisted that the deal was a legitimate business transaction in the interests of the city.

Hamidi was considered a valued U.S. military partner in Kandahar — a good-natured, fluent English speaker who helped build schools, pave roads and plant trees. A U.S. military spokesman in Kabul, Rear Adm. Vic Beck, said in a statement that Hamidi was a “strong leader and voice for a terror-free and progressive Afghanistan.”

Leaving Northern Virginia

Hamidi fled Afghanistan three decades ago after the Soviet invasion and settled in Northern Virginia. He worked for many years as an accountant in a travel agency in Alexandria and raised seven children with his wife. He also lived in Arlington, Burke and Sterling; the family still owns the Sterling house.

His daughter Rangina, who graduated from the University of Virginia in Charlottesville, returned to Afghanistan five years ago to work on women’s projects and urged her father to join her. “None of my relatives wanted me to move back here, but Rangina said, ‘Dad, please come. If you die from a car accident in the States or a bomb in Afghanistan, what’s the difference? You are needed here.’ So I came,” Hamidi told The Washington Post in an interview this year.

By then, many of his top deputies had been killed in insurgent attacks, and it was clear that the Taliban was zeroing in on anyone associated with the Karzai government. But Hamidi said he owed his city and liked his work. “I may have made 50 or 100 enemies, but I am making 800,000 people happy,” he said.

At the funeral for Ahmed Wali Karzai this month, a brother of Hamidi’s worried that the Kandahar mayor would be next.

“If there is no Ahmed Wali Karzai, no one will be there” for Hamidi, said Anwar Hamidi, an official in the Kabul government. “If there is no peace, there is nothing we can accomplish. Nothing.”

Salahuddin is a special correspondent. Staff writer Pamela Constable contributed to this report.