In the weeks before he was killed by Saudi Arabia, journalist Jamal Khashoggi reportedly contributed to efforts to fight a Saudi “troll army” targeting dissidents—a project reportedly masterminded by a top adviser to Crown Prince Mohammed. Sources cited by The New York Times on Saturday say Saud al-Qahtani, who was fired Saturday as the Saudi government said it arrested 18 in connection with Khashoggi’s death, served as the strategist behind a troll farm that threatened and intimidated dissidents online. Qahtani, who previously handled media operations inside the royal court, was reportedly dubbed the “troll master” for his role in the operation. The campaign was reportedly so vast that Saudi intelligence is believed to have successfully recruited a Twitter employee, Ali Alzabarah, to spy on accounts run by dissidents and critics. Khashoggi had reportedly wired $5,000 to a Saudi dissident living in Canada to contribute to an army of volunteers called the “Electronic Bees” who sought to fight the Saudi government trolls on Twitter. Khashoggi, a frequent target of the trolls himself, wrote on Twitter less than two weeks before he was killed that the Bees were coming.