Prosecutors say Corey Johnson, of Brick Township, died Wednesday around 10 p.m.
Police say they received a 911 call Monday from a woman alleging Johnson, her ex-husband, broke into her home while she was at work. When officers arrived, police say the suspect fired a shot that hit a police car before turning the gun on himself.
Police did not say what provoked the gunfire. No officers were injured in the incident.