The mayor of Kandahar was assassinated Wednesday in an attack that comes less than one month after Afghan President Hamid Karzai's brother was murdered.

The Taliban has claimed responsibility for both attacks, which come amid a wave of violence as NATO's military operations in Afghanistan begin to wind down.

Ghulam Haider Hamidi was killed Wednesday at city hall when a suicide bomber detonated a bomb that was hidden in his turban.

The mayor has family in Toronto and spent 30 years living in Arlington, Va., where he worked as an accountant.

In 2007 Karzai appointed Hamidi as mayor of Kandahar, and he returned to his homeland after 30 years in exile.

The fiery official had recently claimed he was waging "jihad" against corruption in the capital of the violent province, and had dismissed a number of municipal officials who were working as engineers without the proper credentials.

He also cracked down on bribery, firing officials who were known to take bribes, and ordered the destruction of shops that he said were set up too close to the city's famous blue mosque.

Murray Brewster, of The Canadian Press, said Hamidi was equally willing to challenge local powerbrokers as he was to criticize the actions of foreign governments working in Afghanistan. As a result, he was very popular among the residents of the city and had a reputation as a free-thinking, populist mayor.

"He struck me as one of the leading lights in Kandahar," Brewster told CTV's Canada AM.

In one of his disputes, Hamidi criticized a $1.9 million Canadian project to erect solar-powered street lights in Kandahar, complaining directly to Ambassador William Crosbie that many of the lights didn't work properly.

Hamidi had survived an earlier assassination attempt in March 2009 and claimed he was in the crosshairs because of his fight against Kandahar's deep-rooted corruption.

"The municipality office is the only organization that wants to fight corruption. Now those corrupt people want to destroy the municipality office and (don't want it) to serve the people," he said late last year.

Hamidi said his main opponents were city powerbrokers anxious to protect their stranglehold on the city, rather than the Taliban.

In a near-prophetic comment, Hamidi told The Canadian Press in an interview that he took the dangerous mayor's job knowing it came with personal risk. Still, he said he felt it was his duty to serve the city where he grew up and was educated.

"I could go back to America, but I choose to be here," he said. "I will fight, fight corruption (and) those corrupt people. This my city. Kandahar is my city and I will die here

Hamidi has a daughter and grandchildren in Toronto.

The Taliban said Wednesday that Hamidi's assassination was retaliation for his decision to demolish illegally constructed homes.

In recent years two of Hamidi's deputies have been assassinated, and many municipal employees have abandoned their jobs in Kandahar, fearing further reprisals.

Earlier this year Kandahar's provincial police chief, Gen. Khan Mohammad Mujahid, was also assassinated.

Hamidi had been widely viewed as a possible successor to Ahmed Wali Karzai, the half-brother of the president and head of the provincial council.

He was killed on July 12 in his home, by a longtime employee.