A US soldier, five Afghan policemen and two truck drivers were also killed in a series of extremist strikes, which have raised fears that violence will mar voting in Afghanistan and damage the credibility of the August 20 polls.
A trailer packed with guests invited to a wedding and towed by a farm tractor -- a common mode of transport in rural Afghanistan -- was hit Wednesday in the southern province of Helmand, government officials said.
"A tractor vehicle full of civilians was going to a wedding party in Garmsir district of Helmand province," interior ministry spokesman Zemarai Bashary told AFP. Helmand is one of the most notorious bastions of Taliban violence.
"On the way the tractor was hit by an IED (improvised explosive device) as a result of which 21 civilians, most of them children and women and young boys, are killed and five are wounded," Bashary said.
It was too earlier to give a breakdown of the dead, he said, blaming "terrorists". There was no claim of responsibility.
Taliban militants, who are masterminding Afghanistan´s increasingly deadly insurgency, are strong in Helmand and rely heavily on bombing in their campaign to bring down the Western-backed Afghan government and evict foreign troops.
Provincial police chief Assadullah Shairzad, who gave the same death toll, said the wedding guests were travelling between villages.
"The killed included children, men and women. The bodies were in bad condition and some were impossible to identify," he said.
"It was very difficult to differentiate between them and count how many were children and how many were women and men."
Garmsir district is an insurgent stronghold where US Marines have for months been trying to push out militants ahead of the landmark presidential and provincial council elections.
It was one of the deadliest strikes in weeks, with insurgent attacks at record levels since the 2001 US-led invasion overthrew the extremist Taliban from government.
The Taliban have ordered a boycott of the poll, when Afghans will vote for only the second time in history for a president, and vowed to block all roads to the voting stations.
IEDs are the weapon of choice for the insurgents and are used nearly every day in attacks across the country.
The US soldier was killed in another IED blast in western Afghanistan on Wednesday, NATO´s International Security Assistance Force (ISAF) announced.
A similar blast in Helmand on Thursday killed five Afghan police and wounded three, the interior ministry said.
In eastern Afghanistan, another traditional flashpoint, militants ambushed a convoy of tankers transporting fuel to international forces, killing two drivers and wounding a third, the ministry said.
The convoy was attacked on a road to Kabul from the eastern city of Jalalabad, near the border with Pakistan, it said. Police arrested a suspect.
This year has seen a record number of attacks in Afghanistan, alarming a population tired of decades of conflict and the host of international powers on which the fragile nation relies for security and aid.
The new NATO chief, Anders Fogh Rasmussen, on Thursday meanwhile continued his maiden visit to Afghanistan.
After arriving in Kabul on Wednesday, he said his decision to visit Afghanistan so soon after taking office on Monday showed that the country was a priority for the 28-nation alliance.
Rasmussen, former Danish prime minister, vowed to strengthen military efforts to defeat insurgents but conceded peace talks with certain groups many be an option to end mounting violence.
However a prerequisite was "that the Afghan government can conduct the talks and negotiations from a position of strength."
"There is no alternative whatsoever to continued and strengthened military efforts," he said after talks with President Hamid Karzai.
The secretary general was to continue a series of meetings Thursday, including with some of the 41 candidates for the presidential elections, for which Karzai is the frontrunner.
US solider killed
Meanwhile, a US soldier was killed in a bomb attack in western Afghanistan, the NATO-led force said Thursday, adding to a soaring foreign military death toll in the fight against the Taliban.
The soldier from the International Security Assistance Force was killed on Wednesday, ISAF said in a statement.
The soldier died when a patrol struck a roadside bomb after troops "engaged" insurgents who were spotted planting bombs in an operation "successfully neutralising their activity," it added.
US military spokeswoman Lieutenant Commander Christine Sidenstricker confirmed the soldier was from United States.
Last month was the deadliest for foreign troops in Afghanistan since the 2001 US-led invasion ousted the extremist Taliban regime from power for sheltering Al-Qaeda following the September 11 attacks.
The independent icasualties.org website says 76 were killed in July, 10 so far this month and 242 so far this year, most of them in hostile incidents.
There are more than 100,000 international soldiers in Afghanistan, including 62,000 US nationals, according to Pentagon figures.
Roadside blast in Afghanistan kills at least 34 civilians