Afghan Defence Minister Gen Abdul Rahim Wardak has survived a gun attack at the airport of the capital, Kabul.
Shots were fired after the minister left the airport
Four gunmen were arrested following the attack on the minister's convoy. No one was hurt in the incident.
"It is clear that it was an assassination attempt on the defence minister," a defence ministry spokesman told journalists.
The attack is the latest in a string of incidents ahead of next week's provincial and parliamentary elections.
Officials say Gen Wardak was not in his vehicle at the time of the attack. He had just left it and boarded a helicopter at the airport.
Defence ministry spokesman Gen Mohammed Saher Azimi the gunmen were wearing military uniforms.
The motive for the attack is not clear.
Four bullets hit "the exact place where the defence minister had been sitting in the car," Gen Azimi said.
"The minister is safe. He had already left the airport by helicopter when the attack happened."
Gen Wardak was travelling to the Panjshir Valley to attend a ceremony in the memory of Ahmed Shah Masood, the celebrated resistance fighter who led opposition to the Taleban.
Masood was killed four years ago.
In a separate incident, a helicopter carrying the country's army chief, Bismillah Khan and another government minister, Sediqa Balkhi, crashed shortly after take off.
Both the officials managed to escape the burning wreckage and were safe, reports say. A government spokesman said the incident took place because the helicopter's rotor blades clipped a tree during takeoff.
Meanwhile, gunmen are reported to have opened fire on a vehicle of a parliamentary election candidate as he campaigned near Herat city in the western Afghanistan on Friday.
More than 1,000 people have been killed in violence linked to militancy in Afghanistan this year.