A U.S. agent hidden under a head-to-toe veil on Sunday sparked fear of a suicide attack in the Afghan capital by fleeing from police who tried to search her, officials said.
Police had thought the woman, who was carrying a bag under her traditional Afghan burqa, was laden with explosives when she tried to enter the Bagh-e Zanana gardens, officials said.
But an official with the NATO-run security force that scrambled patrols to the area said it appeared the woman had panicked because her bag contained a pistol.
"It's all been resolved amicably," the official said on condition of anonymity.
A senior Afghan police officer said the woman had been brought to the Interior Ministry to discuss the mix-up. "It's a big mess," he said.
When confronted at the park, the woman apparently retreated to a four-wheel-drive vehicle parked nearby containing at least one foreign man, officials and witnesses said.
Reporters saw a column of vehicles carrying police and bearded Westerners in plainclothes speeding away from the scene in the direction of the ministry.
Police had sealed off the park, which has been restored with the help of foreign donations and is reserved for women.
Neither the woman involved in the incident nor the American security agency for which she was working were identified.
The capital is on a security alert after a suicide attack last weekend on a shopping street that left three people dead, and the kidnappings of three U.N. election workers on Thursday.