Pakistan's military said on Saturday an armed group operating from Iran had killed four Pakistani border patrol soldiers, in an attack condemned by Prime Minister Shahbaz Sharif.

The incident took place in Kish district of the southwestern province of Balochistan, which shares a long, turbulent border with Afghanistan and Iran.

A separatist group, the Baloch Liberation Army (BLA), which has previously been involved in attacks on Pakistani security forces and Chinese interests in the region, claimed responsibility in an emailed statement.

Baloch ethnic nationalist rebel groups are fighting in the region for a greater share of resources, and these groups are active on both sides of the border.

The Pakistani army said in a statement: "A group of terrorists operating from the Iranian side attacked a routine border patrol of Pakistani security forces on the Pakistan-Iran border."

The military said Pakistani authorities were in contact with Iran to discuss ways to prevent such incidents from happening again in the future.

Iranian state media reported that Tehran's embassy in Islamabad "condemns the terrorist attack in Balochistan province and says terrorism is a common scourge between the two friendly neighbours."

Balochistan is a region rich in natural gas and minerals, and there is also the port of Godar, which is being developed with funding from Beijing as part of China's $65 billion Belt and Road Initiative investment in Pakistan.