A suicide bomber rammed a car filled with explosives into a U.S. government vehicle in northwestern Pakistan on Monday, killing two Pakistanis and wounding 19 others, including two Americans, officials said.

The attack in the city of Peshawar was a vivid reminder of the danger U.S. officials face while working in Pakistan, especially in the country's northwest where Taliban and Al Qaeda militants are strongest. Insurgents have carried out scores of bombings in Peshawar in recent years, but attacks against American targets have been relatively rare because of the extensive security measures taken by the U.S. government.

The bomber struck the vehicle after it left the U.S. Consulate in Peshawar and while it was traveling through an area of the city that hosts various international organizations, including the United Nations, said police officer Pervez Khan, who was part of the security escort for the vehicle as it moved.

The attack killed two Pakistanis and wounded 19 other people, said senior police officer Javed Khan.

Two Americans and two Pakistanis working at the U.S. Consulate in Peshawar were among the wounded, the U.S. Embassy said in a statement, calling the attack a "heinous act."

"We stand ready to work with Pakistani authorities on a full investigation so that the perpetrators can be brought to justice," it said.

The car driven by the suicide bomber contained 240 pounds of explosives, Pakistani police officer Abdul Haq said.

The blast ripped apart the SUV carrying the U.S. Consulate employees and triggered a raging fire, local TV footage showed. Rescue workers and local residents rushed to put out the fire and pull away the dead and wounded. All that was left of the SUV in the end was a carcass of blackened, twisted metal.

Irfan Khan, a local resident, said he was at a nearby shop when the blast occurred.

"I quickly looked back in panic to see smoke and dust erupt from the scene," he said. "I ran toward the scene along with others and saw two vehicles destroyed and the larger vehicle on fire."

One dead person was on the ground near the SUV, and a foreigner was injured, said Khan.

"We put the injured man and the dead body in a private vehicle," said Khan. "There were more injured in the surrounding area too."

Another eyewitness, Wajid Ali, said he helped put another seriously wounded foreigner into the vehicle.

But another vehicle arrived, presumably from the U.S. Consulate, and took away the wounded foreigners, said Javed Khan, the police officer.

Some of the policemen escorting the U.S. vehicle were also wounded in the attack, and their vehicle was damaged, said Khan.

No group has claimed responsibility for the attack, but suspicion will fall on Taliban and Al Qaeda militants who have long had their sights set on the U.S. American drones have fired scores of missiles at the militants' hideouts in Pakistan in recent years, and Washington has given the Pakistani military billions of dollars to fight the extremists.

Islamist militants have targeted American assets in Peshawar, which is located some 85 miles from the capital of Islamabad, on several occasions in recent years.

They unleashed a car bomb and grenade attack against the U.S. Consulate in Peshawar in April 2010 that killed four Pakistanis, including three security personnel and a civilian. In August 2008, the top U.S. diplomat at the consulate survived a gun attack on her armored vehicle. Three months later, gunmen shot and killed an American in Peshawar as he was traveling to work for a U.S.-funded aid program in the region.

Despite the danger, Peshawar has long been a vital hub for U.S. interests in the region. It is the capital of Khyber Pakhtunkhwa province and is located on the border of Pakistan's semiautonomous tribal region, the main sanctuary for Taliban and Al Qaeda militants in the country.

Much of the funds that were handed to Afghans fighting Soviet rule in neighboring Afghanistan in the 1980s were channeled through Peshawar. The city's proximity to the tribal region made it a vital place for American officials to be based following the attacks in the U.S. on Sept. 11, 2001, that triggered the invasion of Afghanistan. Many militants have used the tribal region as a base to attack U.S.-led forces in neighboring Afghanistan.