Mark Duffus, 41, from Forres in Moray, was among at least seven people who died in a suicide attack on the Kabul base of a logistics firm supplying Nato forces in Afghanistan.
He was employed by international security management group Blue Hackle.
Five guards, four of them Nepali, were among those killed in the gun and bomb attack, which happened early on Tuesday.
In his profile on the LinkedIn social media website, Mr Duffus said he had been employed by Blue Hackle since 2005, and was working as a site security manager.
He had previously served in the armed forces for nine years.
The Kabul police chief told the BBC the four insurgents, who were all killed, had a truck full of explosives.
Smoke was seen rising above the scene of the attack in the north of the city.
Reports suggested the bombers' vehicle was stopped outside the facility by guards.
When the explosives were detonated, gunmen began shooting at guards in a 30-minute battle, officials said.
As well as the Nepali guards, two Afghan truck drivers who were waiting to enter the compound were killed and an Afghan guard.
Kabul police chief Gen Ayub Salangi said all four attackers were killed and the blast from the truck left a large crater in the ground.
This is the latest in a series of attacks on targets in the Afghan capital in recent months.
Moray SNP MP Angus Robertson said: "The loss of anybody whether military or civilian in a conflict is terrible for their family, friends and the wider community.
"My sympathies are very much with those family and friends in Forres and elsewhere at this sad time."
A Scottish security contractor has been killed in Afghanistan.