Gunmen in southwestern Pakistan killed four members of a Shia Muslim Hazara family, in the latest apparent sectarian attack on the minority community, officials said.

Two men on a motorcycle opened fire on a family of eight while they were at a filling station some 30km north of Quetta, the capital of Pakistan's Balochistan province, late on Sunday.

Aside from those killed, two others were wounded. Two female members of the family escaped unscathed, having remained in their vehicle.

"This was a sectarian attack," senior police officer Tanveer Shah told the Reuters news agency, adding that no group had claimed responsibility for the shooting.

READ MORE: Why is Balochistan an easy target in Pakistan?

Hazaras are frequently targeted by the Taliban, the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group, and other Sunni Muslim armed groups in both Pakistan and Afghanistan.

Many Hazaras fled to Pakistan during decades of conflict in neighbouring Afghanistan, and nearly half a million now live in and around Quetta.

In 2013, three separate bombings killed over 200 people in Hazara neighbourhoods, raising international awareness of the plight of the community.

More than 20 Hazaras have been killed in similar shootings in Balochistan over the past two years, police say.

The ongoing violence in the province has fuelled concern about security for projects in the $57bn China Pakistan Economic Corridor, a transport and energy link planned to run from western China to Pakistan's southern deep-water port of Gwadar.