A powerful 7.6-magnitude earthquake rocked parts of Pakistan, India and Afghanistan on Saturday, injuring at least a dozen people. Part of a 19-story building collapsed in the Pakistani capital.

Rescue workers were on the scene of the collapse in Islamabad, and at least two injured people were carried from the debris.

In the Pakistani city of Lahore, at least eight people were injured and four shops were damaged, police said. The quake also damaged a school in Rawalpindi, near Islamabad, injuring at least two girls.

A U.S. military spokesman, Lt. Col. Jerry O'Hara, said the quake was felt at Bagram, the main American base in Afghanistan, but he had no reports of damage there or at other bases in the country.

The U.S. Geological Survey said on its Web site that the quake hit at 8:50 a.m. and had a magnitude of 7.6. It was centered 58 miles north-northeast of Islamabad at a depth of about six miles.

Arif Mahmood, a seismological official in the northwestern city of Peshawar, said the quake was felt in much of Pakistan. "It was a very strong earthquake," he said.

Panicked people ran out of homes and offices in many Pakistani cities. It also frightened residents of the disputed Himalayan territory of Kashmir, which is divided between India and Pakistan and claimed in entirety by both.

Residents in the Afghan capital, Kabul, also felt the temblor, fleeing their homes for fear they would collapse. Kabul is about 400 miles northwest of Islamabad.

The tremor also affected northern India. "It was so strong that I saw buildings swaying. It was terrifying," said Hari Singh, a guard in an apartment complex in the New Delhi suburb of Noida.