KANDAHAR, Afghanistan — An Afghan Army unit in the south of the country was almost completely wiped out on Thursday, defense officials said, in a Taliban attack that used what is becoming one of the group’s deadliest tactics: packing vehicles captured from security forces with explosives and driving them into military and police compounds.

At least 43 soldiers were killed in the predawn attack, out of a unit of 60 based in Maywand District in Kandahar Province, the Afghan Defense Ministry said in a statement. Only two soldiers were found unhurt. Nine were wounded, and six were missing.

“The whole base is destroyed,” said Gen. Dawlat Waziri, a ministry spokesman. “When the clashes started, they detonated a car bomb close to the base, then clashes continued for a while and then they detonated another car bomb. They also had Humvees packed with explosives.”

Two similar attacks on Tuesday inflicted heavy casualties on Afghan security forces. In those episodes, more than 40 police officers were killed in Afghanistan’s southeast, in the provinces of Ghazni and Paktia. Both involved insurgents’ taking captured vehicles, including Humvees paid for by the United States military, packing them with explosives and detonating them at the compounds.