More than 100 homes collapsed in Pakistan's North West Frontier Province on Saturday after the quake measuring 5.7 on the Richter scale hit at 3:30pm (1030 GMT). It was followed by an aftershock measuring 5.5.
"Some 22 people have died, including 10 in a passenger van when it was caught in a landslide in the northern town of Batgram," said Brigadier Javed Cheema, head of the Interior Ministry's National Crisis Management Cell.
The van crashed into a ravine after being struck by a falling boulder in Batgram, 120km north of Islamabad, he said. The rest of the victims were killed by collapsing buildings.
Cracks have appeared in hundreds of buildings and roads have also been damaged, Cheema said.
The provincial administration has launched a relief operation and efforts are under way to make a full assessment of the damage.
Tremors were also felt in Srinagar, summer capital of Indian-administered Kashmir. Residents rushed out as buildings shook and power and telephone cables snapped triggering sparks.
No injuries have been reported.
"The earthquakes shook the ski club in Gulmarg too," said Riyaz Ahmad, an employee of the Kashmir tourism department. He said tourists rushed out of hotels.
Tremors are frequently felt in northern Pakistan, where the Indian and Eurasian continental plates collide and seismic activity is high.
The Northern Areas' Astore valley was devastated by an earthquake measuring 5.5 on the Richter scale in November 2002, in which 23 people were killed and about 10,000 people made homeless.