They said 17 people lost their lives over the past three days in the southwestern province of Baluchistan, while six died in Khyber Pakhtunkhwa province in the northwest and five in adjacent tribal areas.
Four women and six children were among the dead.
More than 50 people were injured in both regions. Officials in the central province of Punjab said they were still estimating damage there.
“At least 17 people have died due to roofs and walls collapsing or being struck by lightning,” Zahid Saleem, chief of Baluchistan’s disaster management authority, told AFP.
House collapses also accounted for most of the fatalities in the northwest, said a spokesman for the Khyber Pakhtunkhwa disaster management authority.
Severe weather hits the country every year, with hundreds killed and huge tracts of prime farmland destroyed in recent years.
During the rainy season last summer, torrential downpours and flooding killed 81 people and affected almost 300,000 people across the country.