Air defences installed at Afghanistan's Kabul airport
Washington and its allies are due to end their military mission in Afghanistan at the end of next month, even as the insurgents say they now control 85 percent of the country - a claim impossible to independently verify and disputed by the government.
The Islamic fundamentalist group's rapid gains in recent weeks have raised fears about the security of the capital and its airport, with NATO keen to secure a vital exit route to the outside world for foreign diplomats and aid workers.
"The newly installed air defence system has been operational in Kabul since 2:00 am Sunday," the interior ministry said in a statement. "The system has proven useful in the world in repelling rocket and missile attacks."
Interior ministry spokesman Tariq Arian told AFP it had been installed at the airport, though officials did not offer details about the type of system or who had installed it.
The Taliban have regularly launched rockets and mortars at government forces across the countryside, with the jihadist Islamic State group (IS) carrying out similar strikes on the capital in 2020.
IS also claimed responsibility for a rocket attack this year at Bagram Air base, the biggest US military facility in the country, which was recently handed over to Afghan forces.
Over the years the US military installed several C-RAMs (Counter Rocket, Artillery and Mortar Systems) across its bases, including at Bagram, to destroy incoming rockets targeting the facilities, a foreign security official and media reports said.
The C-RAMS includes cameras to detect incoming rockets and alert local forces.
Turkey has promised to provide security for Kabul airport once US and NATO troops leave next month.
Turkish President Recep Tayyip Erdogan on Friday said Turkey and the United States had agreed on the "scope" of how the airport would be managed under the control of Turkish forces.
Taliban militants have waged a rapid offensive across the country, but mostly in the northern and western provinces, since early May, when the final US troops began leaving Afghanistan.
India on Sunday became the latest country to evacuate diplomats as the security situation deteriorates, with its foreign ministry saying it was pulling staff from its consulate in southern Kandahar, where the Taliban are fighting with Afghan forces on the edge of the city.
A security source added that around 50 Indian personnel, including around six diplomats, were brought home.
Last week Russia announced it had closed its consulate in the northern Afghan city of Mazar-i-Sharif, while China also evacuated 210 nationals from the country.
The fighting has led some veteran warlords to deploy militiamen to counter any attacks.
In the western province of Herat, where the Taliban this week captured a key border crossing with Iran, veteran warlord Ismail Khan mobilised his fighters in the provincial capital.
Pakistan's envoy to Kabul called on the international community to help strengthen Afghanistan's security forces, warning that deploying militia to fight the Taliban could worsen the situation in the violence-wracked country.
"If things translate into some kind of warfare between militias and Taliban, it will be dangerous," Mansoor Ahmad Khan said in an interview with AFP on Saturday.
"Therefore, it is important that Afghan government's capacity to defend these attacks and these security challenges is strengthened."
The Afghan government has repeatedly dismissed the Taliban's gains as having little strategic value, but the seizure of multiple border crossings and the taxes they generate will likely fill the group's coffers with new revenue.
The insurgents have routed much of northern Afghanistan in recent weeks, and the government holds little more than a constellation of provincial capitals that must largely be reinforced and resupplied by air.