More than 100 other people were wounded in the blasts, hospital officials said.

One of the explosions was outside the factory's main gate, while the second went off at almost the same time near another gate, Sardar Shahbaz Hussain, a police official said.

Scores wounded

The ambulance service said scores of injured people had been taken to hospital.

"The blast took place as staff were leaving after finishing their day's duty and it was very crowded," Zaheer Shah, of Edhi Rescue, Pakistan's largest private charity, said.

"So far, more than 100 injured people have been brought to hospital as well as 12 bodies. We have 25 ambulances working and there also army and factory staff engaged in the rescue work," Shah said.

"There were bodies lying everywhere and wounded people soaked in blood were screaming for help," said the manager of a petrol station near the industrial complex.

"Many of the wounded were either without legs or hands. I could see body parts hanging on trees."

Riaz Hussain, a factory worker, said most of the victims were labourers who were joining the afternoon shift.

"I was working in the factory when I heard one blast and then another. They were huge," he said. "Security people then immediately surrounded the place and we were not allowed to go outside."

The Pakistani Ordnance Factories at Wah is a cluster of about 20 industrial units producing artillery, tank and anti-aircraft ammunition for the Pakistani armed forces and  employs around 25,000 to 30,000 workers.

The blasts came two days after a suicide bomber attacked a hospital in the northwestern town of Dera Ismail Khan on Tuesday, which killed 30 people.

Taliban claim

A spokesman for Tehreek-e-Taliban Pakistan, the umbrella group for the country's Taliban militants, said they were responsible for the attack.

"Our bombers carried out today's attack. It is in reaction to military operations in Swat and Bajaur," Maulvi Omar, a spokesman for the group, was reported by the AFP news agency as saying.

Pakistani forces have been battling fighters in Bajaur, in the tribal regions bordering Afghanistan, for nearly two weeks.

The blast is the second attack to hit Pakistan since Pervez Musharraf, the former president, stepped down on Monday.

"A national security is in place in the wake of the bombings," said Hanna.

"In the vacuum of political uncertainty left by the resignation of the president, this just adds to that climate of fear," Mike Hanna, Al Jazeera's correspondent, reported form Islamabad.

Yousuf Raza Gilani, the Pakistani prime minister, strongly condemned the attack and "directed the authorities to make efforts to expose the hidden hands behind the incident", the state-run Associated Press of Pakistan news agency said.