Another crisis in the South-Asian subcontinent has erupted after Taliban authorities warned Pakistan of war as dozens of children and civilians were killed in Afghanistan in rocket attacks by the Pakistani military in a pre-dawn assault along the border.

Border tensions between Pakistan and Afghanistan have risen since the Taliban seized power last year, with Islamabad claiming militant groups were carrying out attacks from Afghan soil.

The Taliban deny harbouring Pakistani militants, but are also infuriated by a fence Islamabad is erecting along their 2,700-kilometre (1,600-mile) border known as the Durand line, which was drawn up in colonial times.

An Afghan government official and a resident in Afghanistan's eastern Kunar province said Pakistani forces fired rockets early on Saturday that left six people dead.

A similar pre-dawn assault was also carried out in Afghanistan's Khost province near the border, another Afghan government official said.

"Pakistani helicopters bombarded four villages near the Durand line in Khost province," he said on condition of anonymity.

"Only civilian houses were targeted and there were casualties," he added, but did not offer more details.

"The Islamic Emirate of Afghanistan condemns in the strongest possible terms the bombardment and attack that has taken place from the Pakistan side on the soil of Afghanistan," government spokesman Zabihullah Mujahid told reporters in an audio message.

"We are using all options to prevent repetitions (of such attacks) and calling for our sovereignty to be respected.

The Pakistani side should know that if a war starts it will not be in the interest of any side. It will cause instability in the region."

Border areas between the two countries have long been a stronghold for militant groups such as the Tehreek-e-Taliban Pakistan (TTP), which operates across the porous frontier with Afghanistan.

The Afghan Taliban and the TTP are separate groups in both countries, but share a common ideology & draw from people who live on either side of the border.