Police officers called to a hotel where six people were injured in a stabbing attack on Friday used a Taser in an attempt to disable the suspect, BBC Scotland understands.
The Taser failed to disable Badreddin Abadlla Adam, a Sudanese asylum seeker, and firearms officers fatally shot him.
The incident took place at the Park Inn hotel on Glasgow's West George Street, which was being used to house asylum seekers due to the pandemic.
Mr Adam's death is being investigated.
The investigation by the Police Investigations and Review Commissioner (Pirc) was ordered by prosecutors at the Crown Office - which is routine where police firearms are deployed.
Its focus is to determine whether the use of a firearm by officers was necessary, justified and proportionate.
Pirc seized the weapon involved, and will take statements from all of the officers at the scene, as well as other witnesses.
It also has CCTV footage from officers' body-worn cameras, and BBC Scotland understands this shows officers first used a Taser on the Sudanese man who had already stabbed six people, including Constable David Whyte.
But it is understood the Taser failed to disable Mr Adam who was then fatally shot by a specialist armed officer.
He was the first person to die as a result of a shot fired by a Police Scotland officer since the force was formed in 2013.
Only one other person has been shot by Police Scotland in that time - Jamie Thomson who was involved in a seven-hour standoff in Kilbirnie in March 2016 during which he fired a crossbow at officers.
Overall police firearms incidents are extremely rare.
In 2018-19, Pirc investigated just two involving conventional firearms: one in which a weapon was presented, the other where it was discharged.
Even if no other person is involved, for instance if a marksman were to shoot out the tyres of a vehicle, there would be a Pirc inquiry.
In the two previous years, there were a total of five incidents involving the use of police firearms.
Pirc also investigates the discharge of Tasers - and in 2018-19 there were seven of these incidents.
Police Scotland has trained and equipped about 500 Specially Trained Officers (STOs) who were routinely armed with Tasers from June 2018 onwards.Police Taser failed to disable knife attacker
At the time, Pirc said: "Generally, it appears that the use of Tasers by STOs increased their safety and allowed them to resolve incidents quickly without having to call upon the force's limited number of specialist firearms officers."
The Scottish Police Authority (SPA), which has oversight of the national force, published a report in 2015 into the policies surrounding the deployment of armed officers.
It followed controversy about the use of armed officers on routine duties such as city centre street patrols.