A rocket has landed near a school in south-eastern Afghanistan just before President Hamid Karzai was to land in a helicopter, officials say.
The rocket struck about 1.5km (a mile) from the school in Gardez province as President Karzai was to land at a nearby airbase.
Mr Karzai, the leading candidate in October's presidential election, was due to speak at the school.
The president has cut short his visit and returned safely to Kabul.
Reports said the rocket landed not very far from where the US military helicopters carrying President Karzai were preparing to land.
It is not known who fired the rocket. No one was hurt, either on the ground or in the air, president spokesman Jawed Ludin told the Associated Press.
American spokesman Major Mark McCann said the rocket landed just 300 metres from where the helicopter was supposed to land.
"The president was not in any imminent danger," Mr McCann said.
President Karzai rarely leaves Kabul because of security risks
Correspondents say President Karzai has rarely been seen outside his heavily-fortified presidential compound since he survived an assassination attempt by suspected Taleban members in Kandahar in 2002.
His critics say he has little control of events much beyond the capital, Kabul, where the country's ethnic warlords again hold sway.
And since last summer, violence by militants opposed to the US-backed administration he runs has sharply risen - with many of their attacks targeting election workers and voters.