A 5.8 magnitude earthquake shook northern Pakistan on Tuesday, killing eight people and injuring 100, government and police officials said.

Media photos and video showed a collapsed building and cracks in roads large enough to swallow cars in Mirpur, a town on Pakistan's side of the disputed territory of Kashmir near India.

District commissioner Mohammad Tayyab said eight people were killed, including three children. District police chief Irfan Saleem said more than 100 more suffered injuries.

"I am in the hospital right now and I am being told that several of the injured people are in a critical condition," he said by phone.

Maj. Gen. Asif Ghafoor, a spokesman for the Pakistan Armed Forces, tweeted that army troops with aviation and medical support teams were dispatched.

"Our whole concentration right now is to accelerate the rescue operation," Raja Farooq Haider, prime minister of Pakistan's Azad Kashmir region, told GNN TV. "There are people who are stuck there and who need immediate help. We are putting in all our resources to get people the best of our help."

The quake struck 14 miles (23 km) north of Jhelum, Pakistan, at a relatively shallow depth of 10 km, the United States Geological Survey reported.

Most damage was in an area between Jhelum and Mirpur, said the chief of Pakistan's National Disaster Management Authority, Lt. Gen. Mohammad Afzal.

The last major earthquake in Kashmir happened in 2005, killing more than 80,000 people.

Jhelum is located in northeastern Pakistan roughly 120 km southeast of Islamabad.