Formal charges have been filed against a man who police say fired nearly 50 random shots in a Walton County subdivision, officials said.

David Cook was charged with 13 counts of aggravated assault and one count of possession of a firearm during the commission of a felony.

He was denied bond in a Thursday afternoon court hearing.

The charges are in connection with the shots fired Wednesday in the Morgans Landing subdivision in Monroe.

After he was subdued by Walton sheriff’s office deputies, Cook said he suffers from depression and wanted to commit suicide by cop.

Walton County Sheriff Joe Chapman said Cook asked why he was not shot before he was taken into custody.

Cook is expected to be scheduled for a mental evaluation.