The U.S. military is planning to start withdrawing troops from this volatile southern city, shifting them to neighboring rural areas even as the Taliban shows it is capable of penetrating the city to attack, according to U.S. and Afghan military officials.

The move is not without risk, because reclaiming Kandahar — the homeland of many Taliban leaders — still motivates the insurgency. Assassins have carried out a ruthless campaign against government officials in the city over the past year, and Kandahar’s vulnerabilities were on display as recently as Thursday, when Taliban fighters launched multi-pronged attacks on two U.S. bases. The attacks killed three Afghans and wounded six Americans.

Still, U.S. military commanders were encouraged by an overall decline in violence in Kandahar over the summer fighting season. With President Obama having ordered the withdrawal of 10,000 troops from Afghanistan by the end of December — and an additional 20,000 by next fall — some combat troops must leave the south, where the bulk of American forces are located, commanders said.

U.S. military officials did not want to reveal the size or timing of their shift out of the city, but they did not dispute that a smaller urban footprint was coming. Their goal is to replicate the situation in the Afghan capital, Kabul, where coalition troops have a low-visibility presence and serve as advisers to Afghan soldiers and police.

“We will begin to thin out and turn over security of Kandahar to the Afghan security forces, in a similar fashion as we did Kabul,” said Lt. Gen. Curtis M. Scaparrotti, the second-ranking commander in Afghanistan.

Some Afghans welcome the prospect of fewer convoys of giant American armored vehicles that clog downtown roads and add to the impression of an occupied city. But others wonder whether the Afghan security forces, particularly the police, can handle the Taliban on their own.

“We are worried about this, 100 percent. Not only the military, but the locals and the tribal elders are also concerned,” said Maj. Gen. Abdul Raziq Sherzai, commander of the Kandahar Air Wing and the brother of a powerful provincial governor. “The city right now is under the control of the Americans. . . . Without them the Taliban activity will increase, there will be more attacks and more instability in the city.”

Early in his tenure, U.S. Ambassador Ryan Crocker visited Kandahar’s governor, Toryalai Wesa, to reassure him that “this was not a shut-the-lights-off-we’re out-of-here” situation, said a U.S. military official in Kandahar.

“Certainly, the governor was apprehensive,” the military official said of the August visit. “There is going to be a reduction [in troops], no question.”

The top prize

From the beginning of Obama’s troop buildup, Kandahar was the top prize. The dusty, sun-baked city spawned the Taliban movement in the 1990s, and the surrounding farmlands remain violently contested, with insurgents having converted large swaths into minefields. “As goes Kandahar, so goes Afghanistan,” the former chairman of the Joint Chiefs of Staff, Adm. Mike Mullen, said last summer.

That target has shifted this year, as U.S. commanders look to the country’s eastern border with Pakistan as their biggest challenge.

U.S. officials have touted declines in violence this year in Kandahar city and in areas of the surrounding province such as the Arghandab Valley, where the bloody fighting of past years amid the pomegranate orchards has tapered off substantially. The roughly 4,500 troops operating in those areas, from the 2nd Brigade Combat Team of the 4th Infantry Division, have recorded steep declines in Taliban activity this year.

Over the three-month period ending in mid-September — the heart of the traditional summer fighting season — the number of U.S. troops killed dropped 90 percent over the previous year, with roadside bombs declining by 60 percent, according to U.S. military statistics. The number of insurgent attacks was down 75 percent last month over the previous September.

Residents in Kandahar recently held large and peaceful gatherings for religious holidays, cricket tournaments and a reading by a famous local poet — signs that a semblance of normalcy is returning to the city, U.S. officials said. A police commander in Kandahar, Maj. Gen. Mohammed Salim Ahsas, said that last year, his men could not drive their Ranger trucks into Taliban-controlled neighborhoods outside the city but now they have greater freedom of movement. “In general, the security situation is much better than last year,” he said.

“When ISAF is talking about withdrawal, it doesn’t mean they will completely leave the scene. They are gradually withdrawing their troops from the city,” Ahsas said, referring to the formal name for coalition forces, the International Security Assistance Force. “Our police, in terms of capacity, are improving and developing day by day.”

Some of his subordinates are less confident about the prospect of fighting the Taliban with fewer U.S. troops to back them up. “If the Americans don’t protect the Afghan government, as they do now, the situation could turn to chaos,” said an aide to Kandahar’s police chief, Gen. Abdul Raziq.

Lack of a strong government

The head of the Afghan Independent Human Rights Commission in the province, Abdul Qadir Noorzai, said that a weak and corrupt government has failed to win the trust of residents and that violence remains an ever-present worry. “If we are talking about one week of calm, one week of bombing, that is not any change,” he said.

The Kandahar government remains in uncertain territory following the killings this summer of Ahmed Wali Karzai — a local strongman and the half-brother of the Afghan president — as well as Kandahar’s mayor.

Many predicted a violent tribal power struggle as various groups vied for Ahmed Wali Karzai’s mantle. Although that hasn’t happened, the government remains weak and reliant on foreign funding.

“The current situation is not ready for withdrawal. The terrorists are still here,” said Hamidullah Popalzai, the head of the district council in Zhari, outside the city. “The Afghan army is not capable of defending the people without coalition support. If we’re going to be serious about this, we need the Americans.”

Special correspondents Javed Hamdard in Kandahar and Sayed Salahuddin in Kabul contributed to this report.