Pakistan says two children were killed and three others injured in strikes by neighbouring Iran on Tuesday.
Iran said it targeted two bases linked to the militant group Jaish al-Adl, according to a news agency affiliated with the country’s military.
It makes Pakistan the third country to be hit by an Iranian attack within a few days after it hit Iraq and Syria.
Pakistan’s foreign ministry said the “illegal” strikes could have “serious consequences”.
In a statement, it added that terrorism is a “common threat” and “unilateral acts are not in conformity with good neighbourly relations”.
A missile attack by Iran on its neighbour Pakistan is near-unprecedented. Tuesday’s strike hit a village in the vast south-western province of Balochistan, which borders the two countries.
Security on either side of their shared border, which runs for about 900km (559 miles), has been a long-running concern for both governments.
Pakistan and Iran have fought armed separatist groups, including Jaish al-Adl, for decades in the sparsely populated region.
Tehran has linked the group with attacks last month close to the border, which killed over a dozen Iranian police officers.
At the time, Iran’s interior minister Ahmad Vahidi said the militants responsible had entered the country from Pakistan.
Jaish al-Adl is the “most active and influential” Sunni militant group operating in Sistan-Baluchestan, according to the office of the US Director of National Intelligence.
On Tuesday, Iran launched ballistic missile strikes against targets in Iraq’s northern city of Irbil, prompting condemnation by the US.