The Weber County Attorney has cleared a police officer who shot and killed a suspected drug and weapons dealer.

"As you know, officers have an absolute right to protect themselves when they are confronted with deadly force," county attorney Mark DeCaria wrote in a letter to Ogden Police Chief Jon Greiner.

But DeCaria revealed that when William Florez pulled a gun on police officers serving a "no knock" search warrant on his 28th Street apartment, he was carrying a BB gun that looked identical to a semi-automatic handgun.

Drug officers had been investigating a pair of homes on 28th Street, suspected of dealing guns and drugs. On April 6, DeCaria wrote that Florez sold undercover officers 11 grams of crystal methamphetamine and a Lorcin .380 handgun.

"He also informed them that he could sell a fully automatic Tech 9 handgun for $400," the prosecutor wrote.

During another buy, undercover officers claimed they were three grams short of meth, and DeCaria said Florez called his neighbor, Myra Carlisle, who agreed to get more.

On May 31, SWAT teams served search warrants on both Florez and Carlisle, who was later arrested. Layton Police Sgt. Travis Homer broke through the living room glass at Florez's home. Ogden Police Officer Jacob Sube broke through the bedroom window.

"Florez appeared in the doorway between the two rooms and pointed a handgun at Sgt. Homer," DeCaria said. "Sgt. Homer fired a burst of seven rounds from his MP5. These shots struck the wall immediately behind Florez."

Florez then ducked into the bedroom, and hiding behind a door, raised his gun at Sube.

"Officer Sube fired two rounds through the door, one of which struck Florez, who went down," DeCaria wrote. "It was later determined Florez was struck one time at the back of his head, fatally wounding him."

It was during the investigation that authorities learned the gun was a BB gun that looked identical to a semi-automatic handgun. DeCaria said the appearance of the weapon and the fear it generated was enough to justify deadly force.

Ogden and Layton police cleared their officers months ago and returned them to duty.