Omar Mateen, the killer responsible for the carnage at the Pulse nightclub in Orlando, two weeks ago, began training to become a corrections officer during the fall of 2006. He worked at a prison in Indiantown, Florida, while attending a correctional academy at a community college. His training didn’t last long.

In April, 2007, the Florida Department of Corrections “administratively dismissed” Mateen, and he was kicked out of the academy. Mateen had felt slighted for being a Muslim, warned that a massacre like the one at Virginia Tech could occur at the academy, and talked about shooting his classmates at a school cookout.

Administrators worried that he might show up on campus with a gun. Five months later, he was hired by G4S Secure Solutions USA, Inc., to work as an armed security guard. He obtained a license to carry a concealed weapon and, over the years, fulfilled various assignments for the company. At the St. Lucie County Courthouse, where G4S had a contract, one of Mateen’s tasks was screening visitors for guns.

In the aftermath of the Orlando killings, many questions remain unanswered—about the role that religious extremism played in the crime, the mix of personal despair and political ideology that motivated the killer, the efficacy of gun-control laws to prevent such violence, the competence of the F.B.I. in recent anti-terrorism investigations. And there is also the question of how G4S, the world’s largest private security firm, could have employed an armed guard who, for almost a decade, angrily and openly threatened to commit mass murder.