Kabul, Afghanistan (CNN) -- British Prime Minister David Cameron changed his schedule at the last minute during his visit to Afghanistan on Thursday due to a possible threat, military sources said.
Cameron was traveling by helicopter in Helmand province, a stronghold of the Taliban, one British military source said.
British commanders altered his travel plans due to "the operational situation" in the area, the source said.
Cameron was not attacked and his party was never under direct threat, the source said.
The British official asked not be identified talking about sensitive intelligence matters regarding the prime minister's personal security.
Task Force Helmand spokesman James Car-Smith told CNN such changes are "not unusual."
"This it is a dynamic operating environment. They always have a contingency plan in place for such an eventuality. Quite simply this time they changed location and everything went to plan," he said.
"There were no problems, it went smoothly and it was a very successful visit," he said.
Car-Smith, who is in Helmand, added that Cameron has "taken off and left us." He would not say if the prime minister was heading back to the UK.
CNN's Barbara Starr, Thomas Evans and Laura Perez Maestro contributed to this report.