KABUL, Afghanistan -- Twenty Afghan policemen were killed in two attacks on Wednesday, including a mass poisoning, in southeastern Afghanistan, officials said.
In Ghazni Province, a group of 17 Afghan policemen who had just been trained by Americans were drugged into comatose stupors by comrades, described after the episode as Taliban infiltrators, while on duty. They were then shot to death in what appeared to be the single worst episode in a string of similar attacks, Afghan officials and an insurgent spokesman said.
In Kandahar Province, three policemen were killed in what the Taliban said was an attack carried out by one of its supporters, although police officials attributed the killings to a relative of one of the victims.
The Ghazni attack, at an Afghan Local Police outpost in Habib Godala village in the Andar district, occurred about 1 a.m., according to Gen. Zrawar Zahid, the Ghazni police chief.
Other Afghan officials said the authorities had already arrested two policemen, described as Taliban infiltrators who had carried out the attack. The attackers poisoned the dinner food of the other officers, shot them at close range to ensure they were dead, stole their weapons and fled after setting a police vehicle on fire.
General Zahid said that 10 of the victims were Afghan Local Police officers who had finished their training, and that the other 7 were recruits who had been undergoing training.
The Afghan Local Police program has been contentious in many parts of Afghanistan because of insider attacks as well as accusations of human rights violations by the policemen.
The local police officers are vetted and trained under the supervision of American Special Operations troops as self-defense forces for their own communities and sometimes include groups of armed men who had formerly sided with the Taliban.
The unit wiped out by the attack had been trained by the Americans at a base in the Andar district center a month ago, local officials said. Only a week earlier, a similar effort was made to drug policemen in that district, but the drug had not been strong enough and the victims were able to escape, according to Khalil Hotaki, head of a peace group in Ghazni.
"We have repeatedly warned the A.L.P. recruiters and trainers to conduct proper and accurate vetting processes for people who want to join the A.L.P. ranks," said Fiazanullah Fiazan, a former provincial governor in Ghazni. "We have told them not to enroll unknown people or people who are not vouched by tribal elders, but they don't listen. They are trying to meet the recruiting deadline and get credit for it."
A spokesman for the Special Operations troops in Afghanistan could not be reached for comment. A spokesman for the NATO-led International Security Assistance Force referred all questions to Afghan officials.
A spokesman for the Taliban, Zabiullah Mujahid, e-mailed a statement to journalists claiming Taliban responsibility for the attack.
"Locals in the area were tired of the atrocities and crimes of these arbakais, and their lives and property were not safe," Mr. Mujahid wrote, using the Afghan term for irregular militias. The deaths of the police officers, he said, meant that "oppression has been weakened and decreased in the area."
In the episode in Kandahar Province, the authorities said, three National Police officers were found shot to death outside their post on the outskirts of Kandahar. A spokesman for the police, Ghorzang, who like many Afghans goes by only one name, said the attacker was not an insurgent, but a heroin addict and a relative of the post commander, who was one of the victims.
Mr. Ghorzang said that the commander had taken the relative to get treatment and that after the police in the post fell asleep the relative took one of their guns and killed the commander and two other officers. The attacker, who was not identified by name, escaped.
But a spokesman for the Taliban in southern Afghanistan, Qari Yousuf Ahmadi, reached by telephone, said the insurgents had recruited the assailant and took responsibility for the attack.
The attacks were the latest in a series of insider attacks, often involving the use of poison or drugs to subdue other policemen, who are then shot while unconscious. Typically, rat poison is used, but the victims are shot as well because the poison is not always fatal when delivered in food.
"This type of attack is so deadly and disastrous, both in terms of loss of human life and in critically undermining trust and confidence among the Afghan national security forces and in particular the A.L.P.," said retired Gen. Atiqullah Amarkhel, an Afghan military analyst.
In January, an Afghan Local Police officer killed his commander and several colleagues in that manner, in the Panjwai district of Kandahar Province. Over 10 days in December, at least three such attacks by policemen or others resulted in 17 deaths.
Taimoor Shah contributed reporting from Kandahar, Afghanistan, and Sangar Rahimi and another Afghan employee of The New York Times from Kabul.
This article originally appeared in The New York Times.