The US has asked Pakistan to boost security along the border

Five shells fired by coalition forces fighting militants landed in North Waziristan region, Pakistani army spokesman Maj Gen Athar Abbas said.

The US military said the strike was in response to an "imminent threat".

US and Pakistani forces have been battling Taleban guerrillas along the rugged Afghan-Pakistan border.

The border is not clearly marked in many places and is frequently traversed by the ethnic Pashtun tribesmen who fill the Taleban's ranks.

The Pakistani army spokesman said a shell fired from Afghanistan had struck a house in the village of Kangrai in North Waziristan.

"The coalition forces were firing at a group of militants when five shells landed in Pakistan, destroying a house and killing two women and two children," Maj Gen Abbas told AFP news agency.

He said Pakistan had complained about the incident but did not believe it was intentional.

A US military spokesman in Afghanistan told the BBC the attack had taken place in response to an "imminent threat" in Pakistan.

Maj Chris Belcher also said the US had carried out similar cross-border strikes in the past.

In a separate interview with AFP, Maj Belcher said the attack had targeted militants led by a Taleban commander, Sirajuddin Haqqani.

He told the agency the Pakistani government had been notified of the attack immediately after it happened.

British air strike

According to Reuters news agency, the attack prompted some 2,000 people to take to the streets in protest in the nearby Bajaur region.

The US has stationed thousands of troops to fight Taleban and al-Qaeda guerrillas in southern and eastern Afghanistan.

Thousands of troops supplied by US allies are also operating in Afghanistan under Nato command.

British forces in the south-western province of Helmand said on Wednesday that they had accidentally killed four Afghan civilians in an air strike.

The Taleban was driven from power in Afghanistan by a US-led invasion in 2001.

The hardline Islamist militia has since mounted a comeback, with its followers mounting bomb attacks and assassinations in Afghanistan and Pakistan.

Pakistan last year accused US-led forces pursuing insurgents in Afghanistan of firing a missile that landed in North Waziristan, killing 10 people.

The US has urged Pakistan to boost security along the border and fight the militants who seek shelter there.