ATTLEBORO, Mass. — Former New England Patriots tight end Aaron Hernandez is holding what authorities have said is a gun in several surveillance photos that were released Thursday and had been recorded hours before – and minutes after – his friend was shot to death.

The photos, taken from Hernandez’s home surveillance system, are in more than 100 pages of court records released by Attleboro District Court. Prosecutors have previously described the photos in court and in affidavits, but this is the public’s first look at images showing Hernandez holding a gun both before and after the killing.

Clearer photos taken from Hernandez’s surveillance video. Look at left hand pic.twitter.com/tX6PNGFFrw

– Brian Ballou (@GlobeBallou) July 25, 2013

Hernandez has pleaded not guilty to murder in the death of Odin Lloyd, a 27-year-old Boston semi-professional football player whose body was found June 17 in an industrial park about a mile from Hernandez’s home. He was shot five times.

Four pictures show Hernandez in his basement holding a gun shortly after Lloyd was killed, an affidavit released Thursday says. The surveillance was cut off within minutes.