Police said Myers fired several shots that missed and was killed by return fire. Officials said that gunshot residue indicated Myers had fired a gun, and that bullets recovered at the scene had been fired from the pistol found near him. Officials also said social media pictures show Myers posing previously with what appears to be the same gun.

Wooten said social media provided insight to Flanery as well.

He said online pictures showed “a guy who is actually in love with weaponry.” More problematic, Wooten said, are comments on YouTube videos. In those, Flanery criticizes liberals and posts comments such as, “Conservatives are better. At everything.”

Flanery’s Instagram account showed pictures of him in the Marines and a video of him in civilian clothes, firing a fully automatic rifle. He praises family and farm life and posted comments such as “runyourgunnotyourmouth.” He also wrote, “I’ve been blessed with the ability to be exactly who I wanted to be when I grew up,” followed by the hashtags “lawman” and “Marines.”

Flanery, 32, on the force for six years, also posted comments on videos of police actions, including a shooting in New York. One comment: “And the moral of the story is ... if you shoot at men with guns they are going to shoot you back. And probably a lot.”