The blast happened in a region not known for suicide attacks

The scene of the attack in the province of Baghlan was left littered with bodies and splattered with blood in one of the worst attacks in recent times.

The attack was condemned by the Afghan president, the White House and the UN.

Analysts say suicide attacks are rare in this area, and the bombing shows the reach of the insurgency is growing.

The Taleban, al-Qaeda and other militant groups are fighting thousands of Afghan and foreign troops in Afghanistan.

Bodies

The bomb exploded at a sugar factory in a town in Baghlan province while a delegation of parliamentarians was visiting - at least six of whom died.

Prominent opposition MP Mustafa Kazimi was among the dead

Among the MPs killed was Mustafa Kazimi, a former mujahideen fighter and prominent opposition figure.

Schoolchildren who had gathered to welcome the politicians were also killed.

"I saw bodies lying in the streets and some of the people were stealing the weapons of the dead soldiers," local resident Mohammad Rahim told Reuters news agency.

"Children are screaming for help. It's like a nightmare," said Mr Rahim, who said the blast had killed his two cousins, both schoolgirls.

The deputy mayor of Baghlan province said that two disembodied legs were all that remained of the bomber following the attack. The bomber's identity is unknown.

The head of hospitals in Baghlan, Yousuf Faiz, told AFP news agency 40 dead and 120 wounded had been registered at four hospitals.

Meanwhile provincial security chief Abdurrahman Sayedkhail told Reuters he was aware of 50 dead, though some relatives had taken bodies away themselves.

Taleban denial

President Karzai condemned the "heinous" attack - one of the worst since the ousting of the Taleban in 2001 - "in the strongest possible terms", he said in a statement.

KEY BOMB ATTACKS SINCE 2001 29 Sept 2007

Suicide attack on Kabul bus kills 30 10 Sept 2007

At least 20 dead in two suicide bombs in Gereshk, Helmand province 17 June 2007

At least 35 dead in bomb attack on Afghan police bus in Kabul 3 Aug 2006

Car bomb kills at least 21 in Kandahar province 16 Jan 2006

Suicide bomb kills at least 20 people in Spin Boldak, Kandahar province 1 June 2005

At least 20 people killed in bomb attack on mosque in Kandahar city

Deadliest bomb attacks

"It is the work of the enemies of peace and security in Afghanistan," he said.

The attack was "a despicable act of cowardice and it reminds us who the enemy is", said White House spokeswoman Dana Perino.

UN Secretary General Ban Ki-moon expressed "his continuing anxiety regarding the unstable security situation throughout Afghanistan".

A Taleban spokesman condemned the attack and denied the Taleban were behind it.

However, suicide bombs in Afghanistan have until now been exclusively the work of the Taleban and al-Qaeda, our correspondent says.

In separate developments:

Canadian Defence Minister Peter Mackay narrowly avoided being injured by a rocket fired by insurgents at a Canadian military outpost in Kandahar province. Four Canadian soldiers were lightly wounded

Taleban militants on motorbikes and in pick-up trucks captured an important district in the province of Day Kundi - the third district captured in a week.

Violence

Until now, most suicide attacks have taken place in the south and east of Afghanistan or, less frequently, in Kabul.

But the UN says the number of suicide attacks is rising sharply. Insurgent attacks have also been on the increase in areas of central and even northern Afghanistan - where violence had tended to take the form of common crime rather than political attacks, says our correspondent.

Fighters loyal to Gulbuddin Hekmatyar - a former mujahideen leader who is battling the Kabul government independently from the Taleban - are known to be active in Baghlan, says BBC analyst Pam O'Toole.

Civilians have often been the victims of the violence in Afghanistan - not only in attacks by insurgents, but also in strikes by the foreign Nato and US forces in the country.