Troops at Camp Bastion in Afghanistan were taken by surprise when 007 star Daniel Craig dropped in on their base.
The actor met 800 soldiers, airmen and sailors just before they watched the new Bond film, Skyfall.
During his tour of the camp, Craig witnessed some of the training given to troops before they are sent to forward operating bases.
He also got the chance to fire some of the machine guns they use and took the wheel of the Foxhound vehicle in which he was shown around.
Warrant Officer Rob Ingham said: "We get quite a lot of visitors here, but having James Bond was special. He seemed to be pretty comfortable in the driving seat!"
Craig later visited the world-class Bastion Role 3 Hospital, which is acknowledged to be a centre of excellence for trauma medicine.
Private Scott Craggs, 23, from Newcastle, a combat medical technician serving with 3 Medical Regiment, said: "It was really good morale for everyone - it's a decent thing for him to take time to come out and visit everyone here."
The star's final stop was a practical demonstration of counter improvised explosive device searching techniques where he was given a chance to use detectors to search for buried training devices.
Warrant Officer Paul Ward, a Squadron Sergeant Major, said: "It was good to see Daniel Craig here in Bastion. Our training is critical to keeping Afghans and our own soldiers safe."
RAF Sergeant Dave Hammond, who was one of those lucky to get a ticket for the film, said: "It was like a return to the old James Bonds. There was a bit of humour and some spectacular effects.
"It was great to be able to see the film here - and to have James Bond himself to introduce it was brilliant!"
Private Shane Awbery, 23, from Doncaster, a communications specialist, said: "It was great for morale and the atmosphere in the tent when we were watching the film was buzzing.
"The film was really good, too - and I liked it that he answered our questions."