FLATBUSH, Brooklyn — The 16 year old arrested in connection with the death of a Brooklyn father was charged with murder during his Friday arraignment.

Adonis Barnett allegedly fatally shot Gerald Cummings in the back and head in front of a school on Aug. 4. Cummings’ son watched the whole thing happen.

Cummings had confronted Barnett and Romell Baptiste, 16, after his son said he spotted Baptiste wearing his stolen hat.

The teens allegedly stole a $400 leather and snakeskin Oakland Raiders hat from Cummings’ son in July.

“A coveted baseball cap set off a deadly chain of events that ended with a father shot to death in front of his teenage son outside an elementary school playground,” said District Attorney Ken Thompson. “This was a cowardly and callous act, for which this defendant will now be held accountable.”

When Cummings tried to retrieve his son’s hat from Barnett and Baptiste, Barnett allegedly pulled out a gun and killed Cummings. The Brooklyn dad died at Kings County Hospital.

Police arrested Barnett on Aug. 18. Barnett faces up to 25 years to life in prison if convicted.