But Samar's comments, and those of Kai Eide, who heads the UN Assistance Mission in Afghanistan, were mainly aimed at encouraging people, including Taliban members, to take part in the August 20 presidential ballot.
Mullah Mohammad Omar, the Taliban's fugitive leader, has called on Afghans to boycott the polls.
"It is important to stretch out a hand and say it's better to compete at the ballot boxes than fight on the battlefield," Eide said.
Samar said: "I expect that every Afghan, where ever they are, even in the districts under the control of the enemies of Afghanistan, takes part in the elections."
The appeals to the Taliban came a day after opposition hopes of unseating Hamid Karzai, the current president, suffered a blow with the withdrawal of nomination by a leading potential challenger.
Gul Agha Sherzai, the governor of Nangarhar province and a veteran of Afghanistan's battle against Soviet forces, had been in talks to head a broad opposition coalition aimed at bridging ethnic divisions.
But over the weekend he said in Nangarhar's capital Jalalabad that he had met Karzai and been persuaded not to run.
"I visited the president, and hugged his little son and decided to withdraw my candidacy for the presidential elections," the Afghan Islamic Press, a Pakistan-based news agency, quoted Sherzai as saying.
"I will neither lead this alliance nor announce my candidacy for the presidential election."
Karzai was installed after a US-led forces pushed the Taliban from power in Afghanistan in 2001.
Meanwhile, in an interview with Al Jazeera broadcast on Sunday, Agha Jan Mutassim, the head of the Taliban's political bureau, said the group would be willing to hold negotiations with the US, but only if certain conditions were met.
In media interviews in recent weeeks, senior Obama officials have discussed holding talks with "moderate Taliban elements" as opposed to the more hardline "irreconcilables".
Mutassim said that the conditions included the unconditional withdrawal of foreign forces from Afghanistan, the release if all Afghan detainees, and the removal of the Taliban and its leaders from the US list of so-called terrorist organisations.
He also denied that the Taliban had held talks with Karzai's government.
"I am categorically denying any dialogue or previous talks, as Karazai's government is very weak and will not be capable of solving the Afghanistan crisis," Mutassim said.
In other news from Afghanistan, Nato-led soldiers shot and killed a 12-year-old girl and wounded two other civilians on Sunday in the country's west when they opened fire at a vehicle close to their convoy, police said.
The girl and her family were driving into Herat from a neighbouring province for a wedding party when the troops passed from the other direction, Abdul Rauf Ahmadi, a police spokesman for the region, said.
"Foreign forces opened fire at the civilian vehicle and killed a 12-year-old girl, wounded a man and a woman."
A spokesman for Italian soldiers based in Herat confirmed the shooting but said troops fearful of an attack had first warned the car to stay away from them.