Afghan President Hamid Karzai escaped unhurt after Taliban militants fired rockets on Sunday at a school where he was meeting with tribal elders, officials said.
One rocket exploded outside the wall of the school, about 150 metres (yards) from Karzai, an AFP photographer at the scene witnessed.
The loud explosion did not appear to disrupt the gathering of about 500 people in the village of Miri in Ghazni province, about 200 kilometres (124 miles) southwest of the capital Kabul.
US-led coalition soldiers providing security for the meeting said another rocket was fired at the school, but appeared not to have detonated, he said. Three mortar rounds fire were also fired.
Chief Taliban spokesman Yousuf Ahmadi said earlier that a militant group in the area had fired 12 rockets at a "vast gathering site."
A man claiming to be the militia's operational commander in Ghazni told AFP later that he had prepared a massive attack on the meeting but only learned Sunday that Karzai would be there.
"We prepared and positioned 120 rockets at various places plus a number of suicide attackers to target the meeting," the man identified as Mullah Momin said.
"Today we realised that Karzai attended the meeting. We could not launch all of our rockets since Karzai attended the meeting and there were helicopters flying over."
The group had however managed to launch 15 rockets, he claimed.
"The rockets forced Karzai to leave the area. We do not permit people in Andar to support them," he said.
A government official, who asked not to be named, insisted however that the attack had not disrupted the meeting.
"It did not affect the president's speech. The president continued his speech and the programme was finished as per schedule," he said.
A statement from Karzai's office, which said three rockets were fired, also said the president's programme had continued as planned.
The statement blamed the attack on the "terrorists and enemies of Afghanistan" a term often used to describe Taliban militants and said the rocket had landed "far from the gathering place and there were no casualties."
It said Karzai had been the first Afghan president to visit the district. Andar has seen other attacks by the Taliban, which has been waging an insurgency since being removed from government in late 2001.
Provincial police chief General Ali Shah Ahmadzai said however the meeting "was shortened and the president left for Kabul after his speech."
Karzai, who does not often leave the capital and always travels with a huge security team when he does, escaped an assassination attempt in September 2002 when a gunman sprayed his car with bullets in the southern city of Kandahar.
In September 2004 insurgents fired rockets at his helicopter in Paktia province.
His fledgling security forces are dependent on the support of about 50,000 foreign troops attached to a US-led coalition and a separate NATO force as they battle the growing Taliban insurgency.
More than 4,000 people were killed in the unrest last year, most of them rebels.