The suspect, who was previously convicted of robbery, was legally barred from possessing guns or ammunition, officials said.