Chance David Baker Credit: CBS 13 photo submitted by Erick Poulin

PORTLAND, Maine — A local police officer was legally justified in shooting dead a man carrying an air rifle in a downtown parking lot last year, according to the Maine Attorney General.

An investigation of the 2017 shooting of Chance David Baker concluded that Portland police Sgt. Nicholas Goodman was justified in using deadly force because he could reasonably believe that the 22-year-old posed a deadly threat.

Portland police had arrived at the Union Station Plaza on St. John Street shortly after 11 a.m. on Feb. 18, 2017, after receiving reports of a man acting erratically and waving a long gun that one caller said could be an air rifle or an .22 caliber rifle, according to the Attorney General’s report.

Soon after arriving on the scene, Goodman shot Baker in the head after he ignored a command not to pick up the gun and leveled it at the officer, according to the report. Before Goodman fired, someone at the scene reportedly yelled that Baker was either pulling the trigger or trying to clear a jammed round from the rifle’s chamber.

Baker was taken to nearby hospital and declared dead shortly after the shooting, the report states. His death came during a surge of fatal encounters with law enforcement that made 2017 the most deadly year for police shootings in the last decade.

[How Maine police shootings are investigated]

The rifle Baker was holding when he was shot was equipped with a scope and appeared to be an actual firearm to the responding officers and several people at the scene but was later revealed to be an air rifle, the report states. Baker had reportedly been drinking from a bottle of Colt 45 and a medical examiner later found him to have a blood alcohol concentration of about four times the amount that would make it illegal to drive.

Baker grew up in the Midwest and was homeless at the time of his death. His family told the Portland Press Herald that they believe he was struggling with undiagnosed mental health illness.

The Attorney General’s office investigates every use of deadly force by Maine law enforcement and has never declared a police shooting unjustified. Goodman was previously found to have been justified in shooting the driver of an SUV that dragged the officer about 300 feet during a 2008 traffic stop.

[Fatal police shootings surge in Maine in 2017]

These investigation do not consider whether an officer should be disciplined or if a shooting could have been avoided. However, Attorney General Janet Mills recently established a task force to review police use of deadly force, following last year’s sharp uptick in the number of people shot to death by police.

Follow the Bangor Daily News on Facebook for the latest Maine news.