Taliban insurgents wearing US military uniforms have attacked two coalition bases in eastern Afghanistan, Nato forces say.
Coalition forces repelled both attacks, killing 24 militants, the Nato-led International Security Assistance Force (Isaf) said.
There were no coalition casualties in the fighting, in Khost province, south-east of Kabul, Isaf said.
The Taliban said about 30 fighters were involved in the two separate assaults.
Five attackers were captured, Isaf said.
The attacks on Forward Operating Base Salerno in Khost province and nearby Camp Chapman began at about 0400 (2330 GMT).
Two of the insurgents managed to breach the fence at Forward Operating Base Salerno and enter the compound, but were killed, a statement from Isaf said.
"Coalition forces had the two insurgents under surveillance and when they cut the fence a quick reaction force was dispatched to the location where they were killed immediately," the statement said.
According to the statement, its troops called in helicopters to assist in repelling the attacks.
Three people, said to be involved in the attack but fleeing in a vehicle, were killed by an airstrike, the statement added.
The BBC's Quentin Sommerville, in Kabul, says that elaborate attacks on forward operating bases are not unusual and that Taliban insurgents are increasingly using this more sophisticated guerrilla-style attack.
Camp Chapman was the scene of a major attack in December, when a suicide bomber entered the base and killed seven CIA employees.
That was the most deadly attack on US intelligence officials since the US embassy in Beirut was bombed in 1983.
Major Wazir Pacha, an officer at the provincial police headquarters told the Associated Press news agency that the militants used rifles, heavy machine guns and rocket-propelled grenades in Saturday's attack.
He also said that police recovered a truck laden with explosives, which may have been intended for use in a suicide bombing, and another containing ammunition, after the two vehicles became stuck in deep mud.
Local police chief Adbul Hakim Ishaqzai told AFP news agency the militants had pulled back after a period of fighting and had occupied a school.
Earlier this week Isaf announced that its forces had captured a senior commander of the local Taliban network in Khost - though it is not clear whether the arrest is connected to the latest attacks.
Meanwhile, across the border Pakistani security officials say four Taliban militants have been killed in a suspected US missile attack.
The missiles hit vehicles being driven by militants in the Kurram tribal area, which is not regularly targeted by US drones.