ISLAMABAD, Pakistan (AP) _ A powerful earthquake rattled northern Pakistan and neighboring Afghanistan early Saturday, but there were no immediate reports of casualties or damage.

The quake, with a preliminary magnitude of 5.8, was centered in Afghanistan's northern Hindu Kush mountain range, roughly 150 miles northwest of Pakistan's northern border city of Peshawar, said an official at the meteorological department.

The earthquake was felt for several seconds in Peshawar and nearby areas at 4 a.m., he said.

In Afghanistan, several northern provinces, where previous earthquakes have killed thousands of people, were shaken by the quake, said Bar Yallahi, a spokesman for the Afghan opposition, which controls the region.

The worst hit was Badakshan province, located 210 miles northeast of the Afghan capital Kabul. But no damage has been reported so far, he said.

In Kabul, controlled by the Taliban Islamic militia, people rushed out of their homes, chanting verses from Islam's holy book, the Koran, witnesses said.