The attack, which occurred near the Parliament building and the prime minister's home, killed at least 40 people and wounded another 200, police said.

People were still trapped in the hotel, which burst into flames after the explosion caused a natural gas pipe leak, officials said. The fire was still burning at 2 a.m., six hours after the blast, according to The Associated Press.

Rescuers worked to move bloodied bodies from the hotel but were forced to stop out of fear that the structure could collapse.

The gas leak set the top floor of the five-story, 258-room hotel on fire, police said, and the blaze quickly engulfed the entire structure.

Mohammed Ali, an emergency service official, told the AP that rescue workers made an initial chaotic search for survivors, but rescuers could make only two trips. Ali said that during the short forays into the hotel, they had found neither bodies nor survivors and had to retreat quickly.

Video showed a deep crater in the pavement where, presumably, the bomb detonated. More than a dozen cars were reduced to twisted steel.

CNN's Reza Sayah was inside a building more than two miles from the hotel when he felt the blast.

"It was a roaring rumble that would not stop. Seconds later, the windows shattered."

GEO TV's Hamid Mir, who was at the site, said he saw at least 52 bodies.

Mir said most of the fatalities appeared to be drivers who were waiting with their cars outside the Marriott Hotel and hotel staff, most of them being security guards.

An Interior Ministry spokeswoman said 257 people had been taken to hospitals and 28 confirmed dead, but government spokesman Fahatullah Babar put the death toll at "about 40."

A spokesman for the Pakistan Institute of Medical Sciences, Dr. Wasim Khawaja, said it had received 25 bodies and 106 people who were hurt, 30 of whom were severely injured. Many of them suffered head injuries and abrasions, he said. Watch bombing victims rushed into hospital »

Mir said someone saw the hotel gates rammed open by a small car, followed by an explosive-laden truck, which detonated. Babar said initial reports said only a small truck laden with explosives broke through the gate.

However, the hotel manager said the blast went off outside the gates of the hotel, which is near the compound that contains the parliament building, the prime minister's house, the Supreme Court and the presidency.

"They were able to come right up to the hotel, close to the seat of power," Mir said.

Mohammed Asghar, who was working in a nearby office, told the AP that there was more than one man in the truck.

The men were arguing with hotel guards, a bandaged Asghar said.

"Then, there was a flash of light, the truck caught fire and then exploded with an enormous bang," he said.

Newly elected President Asif Ali Zardari had addressed a joint session of Parliament and promised to root out terrorism just hours earlier.

A few hours after the attack, he addressed the nation on television, saying he also knows the pain of terrorism because his wife, former Prime Minister Benazir Bhutto, was killed in December as she was campaigning for the post.

"My heart cries tears of blood. I can understand your pain. I want to ask you to turn this pain into your strength," he said, describing the extremism as "a cancer, which we will finish."

"In the holy month of Ramadan, no Muslim can act in this way. These people are not Muslims," he said. "I appeal to all democratic nations to help us get rid of this menace."

Pakistani Interior Minister Rehman Malik said authorities received a threat two days ago.

"We had taken all security measures," he said. "There was heavy security in the city."

He described the attack as a truck bomb.

Located near the diplomatic section of the city and heavily guarded by police and military, the facility is popular among tourists and had been packed Saturday night. Any vehicle entering the facility is searched, its underside scrutinized for bombs, before it is allowed to pass through heavy steel gates.

"The government of Pakistan has condemned it very strongly and reiterated it will not weaken the resolve of the government of Pakistan to fight the militants," Babar said.

At least one American was killed in the attack, and several others were injured, U.S. State Department spokesman Sean McCormack said.

The British High Commission in Islamabad said four British nationals were being treated for wounds suffered in the blast. Two dependents of staff members were treated and released.

A spokeswoman for the German Foreign Ministry said that six Germans in the hotel were slightly hurt in the attack and that all embassy personnel were accounted for.

A U.S. Embassy spokesman in Islamabad said preliminary reports showed all U.S. diplomats accounted for.

In Washington, President Bush condemned the attack, which he described as "a reminder of the ongoing threat faced by Pakistan, the United States and all those who stand against violent extremism."

Both U.S. presidential nominees condemned the attack.

"Today's attack demonstrates the grave and urgent threat that al Qaeda and its affiliates pose to the United States, to Pakistan and to the security of all nations," Democratic nominee Sen. Barack Obama said.

It was unclear on what he was basing his conclusion that al Qaeda or its affiliates were involved.

GOP candidate Sen. John McCain called the attack "an outrageous act of violence."

"While no organization has yet taken responsibility for this act, it is well known that Pakistan faces an enduring threat from violent Islamic extremism, he said. "We must work with the elected government of Pakistan to find those responsible, hold them accountable and diminish their ability to threaten us and our allies in the future."