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."

The Emirates Arena was to host the event from 9-12 April but the EJU changed its mind in a sponsorship row.
It objected to the partnership British Judo had with Ultimate Fighting Championships to promote the event.
The championships will now be held in Baku, Azerbaijan as part of the inaugural multi-sport European Games.
British Judo chairman Kerrith Brown said: "British Judo believes that throughout its partnership with the EJU, it has consistently acted in a professional and diligent manner, based on what we feel is in the best interests of the sport and the athletes competing at the European Championships.
"It is with great reluctance and disappointment that I have to confirm the cancellation, following the EJU's decision to withdraw the hosting rights."
Scotland enjoyed enormous success in judo during last year's Commonwealth Games, landing 11 medals, with team flag bearer Euan Burton and the Renicks sisters, Kimberley and Louise, among six gold medal winners.
Earlier this month, the Renicks sisters spoke to BBC Scotland about how important home backing would be in April as they seek vital Olympic qualification points.
In a statement published on its website, the EJU said: "The European Judo Union has come to the realisation that the British Judo Association does not fit the EJU criteria to host the EJU flagship event.
"The BJA had entered into a sponsorship agreement which did not meet the EJU values. BJA persisted in this, notwithstanding that it had been warned on a number of occasions that this arrangement was unacceptable to the EJU, which has a right under the event contract to approve or disapprove any sponsorships of EJU events."
A Scottish security contractor has been killed in Afghanistan.
[NEXT_CONCEPT]
British Judo has accepted "with great reluctance" the decision by the European Judo Union (EJU) to strip Glasgow of the European Championships.