A judge has ordered a man who authorities say killed two police officers in an ambush from his upscale South Carolina home to have a mental examination.

Prosecutor Ed Clements asked for the examination Monday after 74-year-old Frederick Hopkins wrote to the Post and Courier newspaper of Charleston and blamed post-traumatic stress disorder from his time in Vietnam for the Oct. 3 shooting.

Authorities say Hopkins shot at police officers he knew were coming to his Florence home to question his son and serve a search warrant, continuing to shoot as others tried to save the wounded. Seven officers were struck.

News outlets report Judge Thomas Russo agreed with Clements' request for a gag order after an extensive Post and Courier article on the case.

Hopkins is charged with murder.