Robert Wilson III. Photo credit: NBC Philadelphia

Philadelphia police officer Robert Wilson III was shot and killed during an attempted robbery at a GameStop story in North Philadelphia, authorities said.

Wilson was at the store while on duty to do a "security check" and to buy a gift for his 8-year-old son, who was being rewarded for doing well in school.

Two men entered the store at around 4:30 PM on Thursday, thinking it was an easy robbery target, according to one of the suspects, only to encounter Wilson in uniform. A shootout ensued, with more than 50 shots being fired over a 30-second span, according to NBC Philadelphia (via Polygon).

Wilson, a 30-year-old, 8-year veteran, was shot multiple times at close range, and was killed by a shot to the head.

"The officer was a hero and a warrior--he fought until the very, very end--firing at both of them," Philadelphia Police Homicide Capt. Darrell Clark said.

The suspects, Carlton Hipps (30) and Ramone Williams (26), were later caught and have been charged with first-degree murder, as well as attempted murder for attacking Office Damien Stephenson, Wilson's partner. Both suspects have been arrested in the past, and Hipps was already on parole.

Hipps was shot once in the leg by Stephenson as the suspects left the store. After the shootout, Williams went back into the store to change his clothes, telling those inside not to point him out. They didn't comply, identifying him for police. He confessed to the crimes after being caught.

A trust fund has been set up for Wilson's family. You can find out more details here.