KARACHI, Pakistan (AP) -- Pakistan freed an FBI agent on nearly $10,000 bail three days after he was detained carrying knives and ammunition in his bag, officials said, a relatively quick release that was likely to prevent the situation from escalating into a diplomatic spat.
The arrest of the American, identified as Joel Cox from the bureau's Miami field office, came amid thawing relations between a new Pakistani government dependent on aid and a U.S. administration that needs Islamabad to help contain militancy on the border with Afghanistan.
The two countries, which have been uneasy allies since the Sept. 11, 2001, terror attacks, have seen ties strained over a series of incidents. CIA contractor Raymond Davis shot and killed two Pakistani men in Lahore in January 2011. The U.S. unilaterally killed Osama bin Laden in the Pakistani city of Abbottabad in May 2011 and American forces accidentally killed 24 Pakistani troops along the Afghan border the same year. U.S. drones strikes in the country also have angered Pakistanis.
But Prime Minister Nawaz Sharif, who took office last June, and President Barack Obama have moved to ease tensions. The U.S. has released more than $1.6 billion in military and economic aid to Pakistan that was suspended in 2011, and both leaders have agreed on the need for a stable and secure Afghanistan after the NATO-led combat mission formally concludes there at the end of this year.
The American arrived in Karachi on May 1 and was detained Monday after officials found him with the ammunition, knives and electronic devices as he was preparing to board a flight to Islamabad.
Interior Minister Chaudhry Nisar Ali Khan said the current case should not be compared with the Davis shootings, pointing out the FBI agent had not been carrying a weapon. "He was caught and a court today granted him bail," the interior minister said at a news conference. Photos show the bearded suspect with light hair and a mustache wearing a blue shirt as he left the police station off a dirt road in Karachi.
The U.S. Embassy in Islamabad did not immediately respond to a request for comment.
Shortly after the detention, a law enforcement official in the U.S. said the FBI agent was in Pakistan as part of a multi-agency, anti-corruption program and apparently did not realize that he had bullets in his bag.
Another U.S. law enforcement official familiar with the case identified the agent as Joel Cox, from the bureau's Miami field office. Both U.S. officials spoke on condition of anonymity because he was not authorized to publicly discuss the case.
Foreign Ministry spokeswoman Tasnim Aslam said the man detained "was not a diplomat and therefore, had no immunity." She added he was in Pakistan on a short-term visit and had a valid visa.
The Pakistani court ordered the suspect to submit a surety bond of 1 million rupees ($9,800) for his bail, police officer Rao Anwaar said.
He said the release came a day after police completed the investigation and submitted the report to the court.
Other police officials said investigators were under immense pressure from the Interior Ministry and other government officials to release the American so the report was rushed. They found he had no criminal intention in carrying the bullets during domestic air travel, the officials said, speaking on condition of anonymity in exchange for release the details.
Washington needs Pakistan's help fighting al-Qaida and stabilizing neighboring Afghanistan, as NATO uses Pakistani roads to supply its troops. Washington also has given Pakistan billions of dollars in economic and military aid over the past decade.
Davis, the CIA security contractor, said the two Pakistanis he shot were trying to rob him and he acted in self-defense. He was held for seven weeks then released after the men's families agreed to accept more than $2 million.
Pakistani political analyst Hasan Askara Rizvi said Sharif's government faces a delicate balance in needing to improve relations with the U.S. for financial and diplomatic reasons while maintaining his Islamist support base.
"There might be pressure from right-wing Islamists to keep the American agent in jail," he said in a telephone interview. "My feeling is that the government will not go in that direction."
Gamel reported from Cairo. Associated Press writers Munir Ahmed in Islamabad and Eric Tucker in Washington contributed to this report.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.