Omar Mateen, the killer responsible for the carnage at the Pulse night club 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.

In 2013, other G4S guards at the St. Lucie courthouse warned their supervisor that Mateen had made sexist, racist, and anti-Semitic remarks; that he’d praised Nidal Hasan, the U.S. Army major and self-proclaimed “Soldier of Allah” who shot forty-five people at Fort Hood; that Mateen had claimed connections to members of Al Qaeda and Hezbollah and the brothers responsible for the Boston Marathon bombings; and that he’d expressed the wish to die as a martyr. Mateen had also threatened a deputy sheriff. “Omar became very agitated and made a comment that he could have Al Qaeda kill my employee and his family,” Sheriff Ken Mascara later explained. The sheriff’s office notified the F.B.I., and the courthouse supervisor asked G4S to remove Mateen from his post at the courthouse immediately. Instead of firing him, G4S merely transferred him. For the next year, while on a terrorist watch list and under investigation by the F.B.I., Mateen retained his Florida license to carry a gun and worked as a security guard at P.G.A. Village, a golf resort. Daniel Gilroy, a former police officer who worked with him at the resort, told Florida Today that G4S had been warned that Mateen was homophobic and potentially dangerous. His unsettling behavior prompted Gilroy to leave G4S. “I quit because everything he said was toxic,” Gilroy said. “And the company wouldn’t do anything. This guy was unhinged and unstable. He talked about killing people.” And then he did.

G4S says it was unaware that the F.B.I. had placed Mateen on a terrorist watch list, and claims to have no record of complaints about him by fellow-employees. Its assertions in this case have not always been reliable. According to documents that the company submitted to the state of Florida in September, 2007, so that Mateen could obtain a license to be an armed security guard, a psychological evaluation conducted by Dr. Carol Nudelman had found him to be mentally sound. But after the shootings, Nudelman issued a statement that said, “In September 2007, I was not living or working in Florida . . . and I did not administer any type of examination to Omar Mateen.” G4S responded that there must have been a “clerical error” and that Mateen had been examined by another psychologist. But the company could not say whether that psychologist had ever met with Mateen or administered the test personally.

G4S contends that, because Omar Mateen did not commit mass murder while on the job, the company bears no responsibility for his crime. Nigel Fairbrass, the director of media relations at G4S, explained, “While we continue to review the evidence, we know this much to be true: nothing about Omar Mateen’s employment with G4S contributed to, or could have prevented, this terrible event.”

For the past few decades, the private security industry has flourished worldwide, promising lower costs and greater efficiency as part of a movement for smaller government. During that time, a Danish security company, Group 4 Falck, rose, through mergers and acquisitions, to become G4S, the third-largest private employer in the world, after Walmart and Foxconn, with offices in more than a hundred countries and headquarters outside London. Among its many activities, G4S has guarded oil fields in Kazakhstan, provided security at European rock concerts and shopping malls and banks, operated a prison in South Africa, established centers where rape victims can get medical and counselling services in Great Britain, guarded embassies in Afghanistan, and run its own private-investigation service.

Some of the “upscale security officers” that G4S employs in the United States earn lower wages than fast-food workers. The company has long been accused of cutting corners, reducing pay, and caring more about profit margins than public safety. In 2012, G4S gained publicity by failing to hire enough security guards for the London Olympics, forcing the British military to supply more than four and a half thousand troops at the last minute. In 2014, G4S lost the contract to manage a migrant-detention center for the Australian government, amid allegations of violent, abusive, and poorly trained staff. On a more trivial note, in May of this year, G4S employees operating the 999 emergency telephone service in Lincolnshire, England, were caught dialling 999 hundreds of times. By calling themselves and quickly answering the phone, the workers improved the company’s apparent performance in responding to emergency calls.

The state of Florida has been a pioneer in the transfer of public services to private companies. In 1954, George Wackenhut, a former F.B.I. agent, started a small detective agency in Miami. It grew to become the Wackenhut Corporation, an international conglomerate that worked closely with the F.B.I. and the C.I.A., specializing in corporate security, airport security, strike-breaking, anti-terrorism, the defense of critical infrastructure, and private prisons. George Wackenhut was politically conservative and kept files on two and a half million Americans deemed to be “subversives.” His company was bought, in 2002, by the Danish firm that later became G4S. Although Wackenhut’s private-prison division was sold off the following year, G4S has benefitted from the privatizing, small-government philosophy of Rick Scott, Florida’s current governor. In 2013, the state completed the privatization of its fifty-six juvenile-detention centers. Twenty-eight are now operated by G4S Youth Services.

The G4S juvenile facilities in Florida have been notable for disturbances, escapes, high levels of violence among the detainees, and sexual assaults by staff members. During an August, 2013, riot at the Highlands Youth Academy, in Avon Park, G4S employees lost control of the detention center and fled the premises. More than a hundred and fifty security officers from local sheriffs’ departments, the Highway Patrol, the Department of Corrections, and the Florida Fish and Wildlife Conservation Commission entered the facility and ended the riot, with the aid of K-9 units and air support. A grand-jury report on the causes of the disturbance was released in 2015. It said, “The buildings are in disrepair and not secured, the juvenile delinquents are improperly supervised and receive no meaningful tools to not re-offend, the staff is woefully undertrained and ill equipped to handle the juveniles in their charge, and the safety of the public is at risk. . . . Yet G4S has a 9% profit margin and expects to make $800,000.00 in profit this year from the operation of the Highlands Youth Academy.” The G4S juvenile facility was “a disgrace to the state of Florida,” the grand jury concluded, and should “cease to exist.”