Sgt. Allen Brandt, who was shot Oct. 16 while responding to a report of gunfire, died Friday afternoon from complications that followed surgery to remove shrapnel from his eye.

An Alaska cop died Friday due to complications from surgery, two weeks after he was shot while on duty — a shooting he predicted while reading bedtime stories to his children.

Sgt. Allen Brandt of the Fairbanks Police Department underwent remedial eye surgery after being shot on Oct. 16.

“Fairbanks lost a hero today,” Deputy Police Chief Brad Johnson said at a news conference, holding back tears.

“Sgt. Allen Brandt lost the fight. He had surgery yesterday and suffered complications afterward, which continued to deteriorate though the day and from which he was unable to recover,” Johnson said.

Dashboard camera video captured Brandt’s assailant, identified as Anthony G. Jenkins-Alexie, wielding a gun and preparing to shoot the 11-year police veteran. Body armor protected the officer’s chest, but bullet fragments struck the officer’s eye, police said. Brandt responded to a call of shots fired in downtown Fairbanks.

Anthony George Jenkins-Alexie, 29, was arrested for shooting Sgt. Brandt. Jenkins-Alexie faces charges of attempted murder, assault and other counts.

Brandt foretold his own future. After reading bedtime stories to his four children, he told his family that he thought he would be shot that evening.

“I read them a story like I do, and after the story I told them, I think I am going to get shot tonight, and it happened,” he said in a City Council address.

“I am not complaining,” he said. “But I just want you to know what it’s like in the life of a police officer.”

Brandt delivered the address after his initial hospital release, before undergoing surgery on his eye, and appeared to be in good form.

Sgt. Allen Brandt told his family that he thought he would be shot after reading his children a bedtime story, and before going to work on the fateful evening.

“Can you believe I was shot five times to the legs and I walked into this room?” he said to raucous applause.

The Fairbanks Police Department Employee’s Association has set up a fund to support Brandt’s family, which has so far raised more than $60,000.

Court records show that Jenkins-Alexie has been arrested on charges of attempted murder, assault, theft of a firearm, theft of a patrol car, evidence tampering, possession of a firearm as a felon and firing a gun at a building. He is represented by a state public defender.