Relatives of passengers gather outside the hospital in Quetta on Saturday, after unidentified gunmen stormed passenger buses in southwest Pakistan, killing at least 21 people.

AFP/Quetta

Unidentified gunmen stormed two passenger coaches in southwest Pakistan and killed at least 21 people, officials said on Saturday.

The buses were en route to Karachi when they were stormed in Mastung district in the troubled province of Baluchistan late Friday, according to Mastung deputy district commissioner Akbar Harifal.

"The death toll has risen to 21," Harifal told AFP.

Officials had earlier put the death toll at 19, but one passenger later died in hospital overnight while the dead body of another passenger was recovered from the site of the attack.

Harifal said security forces rescued five passengers after a firefight with the assailants. It was unclear exactly how many passengers were on the buses.

Baluchistan Home Minister Sarfaraz Bugti said 15 to 20 attackers armed with guns and other automatic rifles were involved in the attack.

He told reporters on Saturday that a massive search operation involving 500 ground troops and supported by four helicopters was under way.

"Two terrorists have been killed and the search and cordon operation is on," Bugti said. "We have cordoned the attackers in a large area."

An AFP reporter in Quetta said around 800 relatives of the passengers carried the victims' bodies and staged a sit-in protest in front of the provincial chief minister's official residence.

The protest, which continued for more than 10 hours, only ended after Chief Minister Abdul Malik Baloch pledged to tighten security, arrest the attackers and raise compensation for victims' families.

The provincial government on Saturday announced more than 1mn rupees ($9,800) as compensation for the families of each of the victims.

Quetta and surrounding areas were tense while markets and all business centres remained closed to protest the killings and to express solidarity with the families of the victims.

No group has yet claimed responsibility for the attack but Baluch separatists demanding greater autonomy have been waging an insurgency for years and the province is also riven by sectarian strife and Islamist violence.