In November 1996, President Clinton visited Manila for the Asia-Pacific Economic Cooperation Forum. Protests raged in the streets, with American flags being burned, so local police closed down many roads, allowing the Secret Service to chart a specific route for the president’s motorcade. As the president and members of his cabinet traveled from their hotel to the first venue of the day, “There was intelligence that came in, and we at the last minute decided to change the motorcade route,” a former Secret Service agent recalls. “It was determined that al-Qaeda and Osama bin Laden had placed a bomb along the route in anticipation of the motorcade coming that way.”

Bin Laden had indeed placed a bomb under a bridge, and just before the president’s motorcade was due to cross it, the Secret Service re-routed the vehicle down a side road. President Clinton (codename: “Eagle”) was safe.

Twenty-one years later, there was a plot against President Trump’s life in Manila—a shocking fact revealed in United States Secret Service: On the Front Line, a two-hour special airing on the National Geographic Channel Sunday night that—for the first time—provides viewers with a behind-the-scenes glimpse of the workings of the Secret Service, and the complex measures they take to protect the president of the United States.

President Trump (codename: “Mogul”) was due to arrive in the bustling city to meet with Philippine President Rodrigo Duterte and other South Asian leaders at the ASEAN 50 summit in November 2017. Chad Ragan, a special agent in the Presidential Protective Division, was the Secret Service agent in charge for the trip; Audrey Gibson, a special agent in the Protective Intelligence & Assessment Division (aka “The Bubble”), served as his eyes and ears.

The Secret Service comprises four main teams: Protective Intelligence; Uniformed Division; Protective Operations; and Investigations. The Protective Operations team includes those in the “inner circle,” standing steps from POTUS, and special ops, such as countersnipers and the K-9 explosive detection unit. Protective Intelligence analyzes threats against the president, both on and offline. The Uniformed Division guards the White House or anywhere POTUS goes. And Investigations monitors the motives of people who make threats against the president.

“There is credible information that an incident could occur during ASEAN,” says Special Agent Gibson, leading the Secret Service’s personnel brief in Manila. Pointing to a map of ISIS and ISIS-affiliated threat actors, she adds, “As of this week, the Philippines has escalated to a critical threat level.” (Days before the president’s visit, ISIS issued a series of threats—via video—that featured a picture of the president filled with bullets, and a message urging jihadists to “lie in wait” and “ambush” POTUS in the Philippines.)

Prior to President Trump’s arrival on Air Force One, a PID agent informs Special Agent Gibson that he’s come across a credible threat against POTUS—in the form of a tweet reading, “Gonna be in Manila the same time as Trump… I’ll take one for the team lads,” accompanied by a mugshot of Lee Harvey Oswald. And on his Instagram, they find a photo of the male suspect wielding a copy of the book How to Kill: The Definitive History of the Assassin. The PID agents then track his IP address and discover that the man is indeed located in downtown Manila, kilometers away from the president’s hotel, and his social media posts reveal that he is traveling in the direction of the president’s hotel. They continue to monitor him.

“With social media, there’s software that can scroll through all of [the threats] at a much faster rate than any human can do it, so in some regards it makes it easier. But the bread and butter of what we do is the human element—and the people that work the mission—and that’s never going to change,” Special Agent Gibson tells The Daily Beast.

If that weren’t enough, Special Agent Gibson and her team learn that an ISIS operative is somewhere in downtown Manila, and is targeting President Trump. And 20 minutes before touchdown, the Secret Service still isn’t sure where the ISIS operative is. “What is going on proactively to track this guy down?” Special Agent Ragan is seen shouting into a phone. “I need an update. Now.”

Special Agent Gibson and her fellow PIC agents soon track down the ISIS operative to Luneta Park, about a mile north of the president’s hotel, where the suspect is reportedly convening with “an associate.” They inform Special Agent Ragan, who then informs the Philippine National Police (PNP), whose officers swarm the park and apprehend the suspects. Crisis averted.

“ It doesn’t matter if you like the person that’s in office, it doesn’t matter if you don’t like the person that’s in office—the bottom line is you’re not protecting that person, you’re protecting the office and what it stands for. ”

“With technology, that was one of the things that was a blessing for us, because we were able to know that he was moving close to us, where he was, and track him. That was a huge piece of stopping the threat,” Special Agent Ragan tells me.

He adds, “Of course, we had a lot of help from the locals—and that’s an essential key to it that can’t be understated, is how great these foreign governments are, or even locals. If we go to Topeka, Kansas, the local law enforcement is such a help. We get so much support from the host committee, or the host country.”

Special Agent Ragan, who also worked in the Secret Service’s Presidential Protective Division under President Obama, maintains that despite his high volume of travel and large family, things aren’t any more difficult protecting President Trump.

“They travel quite a bit, but in terms of the mission, the scope, all of that, it really has no impact,” he tells The Daily Beast. “I think there’s an inherent uniqueness to any time you’re dealing with presidential children. With Barron, there’s a unique aspect that was the same thing with the Obama girls, which is them going to school and trying to let them be children. And with the adults, especially with this family, they are very wealthy, they do have means, they do travel, but the template for us stays the same. Whether we’re going commercial or we’re going private, the template stays the same.”

While the Secret Service agents are incredibly tight-lipped, refusing to discuss whether they’ve received more threats against President Trump than they did against President Obama, or whether they find ex-Secret Service agent turning right-wing pundit Dan Bongino’s self-serving partisanship off-putting, they do agree that it’s “incredibly important” that Secret Service agents remain non-partisan while they’re on the clock.

“It’s sad, just as an American, how partisan everything is,” Special Agent Ragan says. “That being said, it doesn’t matter if you like the person that’s in office, it doesn’t matter if you don’t like the person that’s in office—the bottom line is you’re not protecting that person, you’re protecting the office and what it stands for. We all believe that. Even though we’re U.S. citizens, have opinions, and talk them over at dinner with our friends or whatnot, work is work. You believe in the mission and the office of the presidency, and that’s one reason that we are able to rise above the politics of it all, because we’re going to protect a Democrat as much as we’re going to protect a Republican as much as we’re going to protect an Independent or Green Party member.”

In addition NatGeo’s United States Secret Service: On the Front Line, Special Agents Ragan and Gibson both say that if you want a good idea of what life is like as a member of the Secret Service, watch the film Guarding Tess, starring the inimitable Nicolas Cage.

“If you’re wanting a movie to really know what it’s like to work as a member of the Secret Service on a daily basis, watch Guarding Tess,” says Special Agent Ragan. “There’s a lot of truth to that. They’re guarding the first lady and there’s a lot of tedium, and that’s a big part of what the job is. There’s a lot of standing around, a lot of waiting, a lot of hoping that nothing bad happens, but then you’ve gotta be prepared if it does.”