President Hamid Karzai declared three days of mourning for victims of a homicide bomb targeting a group of lawmakers, and raised the death toll Wednesday to 41, making it the deadliest attack in Afghanistan since the 2001 U.S.-led invasion.

Hundreds of mourners gathered at a mosque near the site of the bombing in the town of New Baghlan, 95 miles north of Kabul, before families migrated to a simple hilltop graveyard to bury the dead.

The attack happened Tuesday as the lawmakers were being greeted by children on a visit to a sugar factory in Afghanistan's normally peaceful north.

"My son was supposed to finish school this year, but yesterday I had to peel off his blood-soaked clothes, and today I buried him," said an elderly man who broke down in tears on top of a gravesite. He didn't give his name.

Karzai said six members of parliament were killed in the blast and warned that the overall toll could rise even further because some of the victims might have been taken away from the scene without being counted officially.

The president, joined by dozens of other Afghan leaders, watched honor guards carry the coffins of the six lawmakers out of a helicopter and down a red carpet at Kabul's main airport Wednesday.

Karzai blamed the bombing on "the enemies of peace and security," a phrase often used for the militant Taliban, and directed authorities to conduct a thorough investigation. Such a spectacular attack also could have been the work of al-Qaida. The Taliban denied involvement.

The White House called the attack "a despicable act of cowardice."

Shots were fired at the scene after the bombing, said 20-year-old Bakir, whose cousin, the lawmaker Sayed Mustafa Kazimi, was killed in the blast.

Five civilians were treated for bullet wounds at New Baghlan's hospital, said Dr. Narmgui, a doctor at the hospital who, like many Afghans, goes by only one name.

Karzai ordered an investigation into the attack.

Video obtained by AP Television News of the scene just before the blast shows schoolchildren, tribal elders and government officials lining the streets to greet 18 lawmakers as they were about to enter the sugar factory.

Some of the children shook hands with the guests and one teenager handed red and pink roses to lawmaker Sayed Mustafa Kazimi — a former Afghan commerce minister and a powerful member of the opposition party National Front.

Moments later, Kazimi was dead.

At least 42 of the 81 wounded were schoolchildren, Mohammad Yousuf Fayez, a doctor at Baghlan's main hospital. Several children were among the dead.

The video does not show the explosion. After the blast, the video shows dead and wounded schoolchildren on the ground. Shoes, sandals, hats and notebooks were scattered about.

Two men carried the bloody body of a boy by his limbs and put it on the hard-packed dirt. Men placed another body next to four others already laid out under a tree. Elsewhere, a body with a severed arm was lying amid rubble.

Many victims were taken to the hospital, their legs and faces stained with blood. The video shows a woman leaning over a child lying motionless in a hospital bed. A boy, his legs bandaged, cried on a gurney that looked to have been left in a hallway.

The video also shows an Afghan man holding the head of what he claimed was the homicide attacker, shouting "Look at this (expletive)! This is the guy who destroyed everything! This is the guy who killed us!"

No one claimed responsibility for the attack, and a purported Taliban spokesman, Zabiullah Mujahid, denied the militant group was involved.

"The Taliban doesn't target civilians," he said.

Taliban attacks typically target Afghan and international security forces or government leaders but often kill civilians nearby. Most of their attacks are in the country's south or east. Taliban bombers have killed regional governors in the past, but never so many public figures at once.

Two parliamentarians were killed in attacks in Kabul earlier this year, which is already Afghanistan's deadliest since the fall of the Taliban. More than 5,700 people have been killed in insurgency-related violence, according to an Associated Press count based on figures from Western and Afghan officials.

The northern region where the blast happened is known for tensions between the mainly ethnic Tajik government leadership and remnants of the militant group Hezb-i-Islami, whose fugitive leader Gulbuddin Hekmatyar, an ethnic Pashtun, has joined the Taliban and al-Qaida in fighting the Afghan government though he denies direct links.