ensuring the continued cooperation on counterterrorism issues of a secretive monarchy whose fundamentalist brand of Islam was widely considered to be a central force in the rise of Islamist terrorism.

"My job as legal attache was to get as much information as I could from the Saudis on terrorism," a former FBI agent said. "If I am talking to them about their nationals committing crimes in the United States, it's going to shut me down. It's not my lane. It would be handled through diplomatic channels."

Saudi Arabia became a critical partner for the CIA and FBI against a rising militant group that posed a surprisingly direct threat to the United States: al-Qaida in the Arabian Peninsula, or AQAP. The group, an offshoot of the Osama bin Laden organization, plottedrepeatedly to bomb aircraft bound for the United States and came dangerously close in 2009 when a bomber with explosives hidden in his underwear nearly brought down a jetliner. Later, the Saudis became an important ally in the fight against ISIS, which included several thousand Saudi fighters and carried out attacks in Saudi Arabia.

Although the US Embassy continued to receive periodic communications from the United States about Saudi fugitives evading justice, terrorism always dominated the workload, former officials said. Some former FBI agents said senior CIA officials in the kingdom, who had an even closer and more fruitful relationship with the Saudi security services, were especially reluctant to raise issues like the Saudis' help to fleeing students.

Former FBI officials also said they believed their ambassadors — from both