A British civilian contractor shot dead by someone wearing an Afghan national security force uniform was a father of two from Kent.
Dave Chamberlain was killed in western Afghanistan alongside two American colleagues by a gunman who turned his weapon against the US-military coalition, sources said.
Mr Chamberlain, who was in his 40s and from Westgate-on-Sea, was working for the Border Management Task Force, which trains and mentors former Afghan customs officers and border policemen, when he and his colleagues were killed, a source said.
He said the "green on blue" incident was carried out by a man wearing an Afghan national police uniform who shot at a group sitting outside one of the buildings.
The source said: "One of the Customs and Border Protection officers from America returned fire and killed the assailant."
He said another American national had been taken to hospital with severe injuries and that an Afghan interpreter was also injured during the shooting.
Mr Chamberlain is believed to have been in Afghanistan since February last year.
The source said: "Everyone involved is in a state of shock. All of us know the dangers but do not expect it to happen like that.
"There are rocket attacks and roadside bombs but one thing you never see coming are the people you are training."
He said he believed the British Embassy in Kabul was making arrangements to have Mr Chamberlain's body repatriated to the UK.