Pakistan's foreign ministry says militants crossing over from Iran earlier this week carried out a deadly attack against its armed forces in the southwestern Baluchistan province.

The ministry said in a letter to the Iranian government on Saturday that the assailants came from a newly formed Baluch separatist group, Raji Aajoi Sangar, based in Iran's adjacent Baluchistan province. It urged Iran to act against the attackers who had fled back across the border.

Groups operating both within Pakistan's and Iran's Baluchistan provinces, which share a long border, seek independence from both countries.

The ministry said that the "killing of 14 innocent Pakistanis by terrorist groups based in Iran is a very serious incident that Pakistan protests strongly."

The announcement came a day before Prime Minister Imran Khan's visit to Iran.