Pakistan has given the US 15 days to vacate an airbase used as a key launchpad for drone strikes in Afghanistan in retaliation for a mistaken attack on a Pakistani border outpost that killed at least 24 soldiers and injured 13.

American forces were told to leave the remote Shamsi airbase, secretly given over to the US after 9/11, following an emergency meeting of Pakistan's top civilian and military leadership late on Saturday. Pakistan has also blocked supply routes for US-led troops in Afghanistan.

Shamsi was used heavily for launching the war in Afghanistan in late 2001, and later served as the base for the US drone programme. Set in sparsely populated desert in the western Baluchistan province, Shamsi is highly controversial within Pakistan for its association with drones, which Islamabad officially condemns.

Location of Nato attack and Shamsi airbase.

The decision of the country's defence committee of the cabinet is an admission that Shamsi remains in American hands. The committee announced that the government would "revisit and undertake a complete review of all programmes, activities and co-operative arrangements" with the US, and US-led forces in Afghanistan, "including diplomatic, political, military and intelligence".

Relations between Islamabad and Washington were already under deep strain before the incident, in which helicopters from the International Security Assistance Force (Isaf) operating in Afghanistan shelled checkpoints on the Pakistani side, apparently in error.

"These attacks, which constituted breach of sovereignty, were violative of international law and had gravely dented the fundamental basis of Pakistan's co-operation with Nato/Isaf against militancy and terror," said a statement issued by the committee, which is chaired by the prime minister and includes the army chief. "Nato/Isaf attacks were also violative of their mandate, which was confined to Afghanistan."

The deaths of the Pakistani soldiers will fuel anti-American sentiment in Pakistan, a key US ally. Although there have been previous deaths of Pakistani troops caused by mistaken fire from coalition aircraft, the scale of the bloodshed this time was far greater. Pakistan's army chief, Ashfaq Kayani, put the death toll at 24. Other reports put the number killed as high as 28.

The border between Pakistan's tribal area and Afghanistan is poorly marked. Insurgents who use the tribal area as a safe haven often fire on coalition and Afghan troops from positions close to Pakistani checkpoints, raising US suspicions that the Pakistani military collaborates with the insurgents.

Isaf and the Pakistan military have poor communication and maps of Pakistani checkpoints and the Afghan border do not always match.

The attack took place in the early hours of Saturday morning, at about 2am local time, at an outpost on a mountain about 1.5 miles from the border, in the Mohmand part of the tribal area. Mohmand borders both Kunar and Nangarhar provinces in eastern Afghanistan.

The defence committee confirmed that the supply routes for the coalition through Pakistan had been stopped. Around half the supplies for international troops in Afghanistan pass by road through Pakistan. Pakistani television showed lines of trucks carrying containers lined up at border.

Two years ago a similar border incident in which two Pakistani soldiers died after they were mistaken for insurgents led to Pakistan closing the border for 10 days.

On Sunday the US ambassador to Islamabad, Cameron Munter, who was summoned to Pakistan's foreign ministry for an official protest, pledged that the US would "work closely with Pakistan to investigate this incident". However, neither he nor the American general in charge of coalition troops in Afghanistan, General John Allen, admitted the US had caused the deaths or provided any details.

Allen had visited Islamabad a day earlier for talks with Kayani "aimed at enhancing border control on both sides".

While Pakistan officially condemns the operation of US drones on its territory, which strike suspected militants in the tribal area, it quietly continues to co-operate with aspects of the drone programme. It is believed that drones still use Shamsi, but it is unclear whether they are armed or purely for surveillance. Most of the drone flights have switched to an airbase at Jalalabad in Afghanistan.

Pakistan's previous threats to expel the US from Shamsi were never carried out. Pakistan's co-operation is considered vital to the US in Afghanistan, both in mopping up al-Qaida, whose remaining leadership is still believed to be hiding there, and to help stabilise the country.

Following a series of bitter disputes this year, military and intelligence co-operation between the US and Pakistan was scaled back with the end of a training programme in counter-insurgency for Pakistani soldiers and a big reduction in CIA personnel and activities.

Relations were shattered first by the furore surrounding a CIA contractor who shot dead two Pakistanis in Lahore. Then in May the unilateral US special forces raid that found and killed Osama bin Laden in northern Pakistan torpedoed what goodwill remained.

Western officials allege that Pakistan has played a "double-game" since 2001, by allying with the US but at the same time providing support to the Taliban and other Afghan insurgents.