Soon after Donald Trump became president, authorities tried to warn him about the risks posed by golfing at his own courses because of their proximity to public roads. Secret Service agents came armed with unusual evidence: not suspect profiles or spent bullet casings, but simple photographs taken by news crews of him golfing at his private club in Sterling, Va.

They reasoned that if photographers with long-range lenses could get the president in their sights while he golfed, so too could potential gunmen, according to former U.S. officials involved in the discussions who, like most others interviewed for this story, spoke on the condition of anonymity because of the matter’s sensitivity.

But Trump insisted that his clubs were safe and that he wanted to keep golfing, the former officials said. These preferences posed problems for his protection that former Trump aides, Secret Service officials and security experts said have only intensified in the years since he left the White House, as his security detail shrank and agents no longer maintained as extensive a perimeter guarding his movements. A Trump spokesman did not respond to a request for comment.

The problems became gravely apparent on Sunday when a gunman pushed a semiautomatic rifle through the bushes at the Trump International Golf Club in West Palm Beach, Fla., in what authorities are investigating as a possible effort to assassinate the former president — the second attempt on his life in as many months.

Trump was unharmed. In a post on social media, he thanked Secret Service and law enforcement. “It was certainly an interesting day!” he wrote. “THE JOB DONE WAS ABSOLUTELY OUTSTANDING.”

On Monday, Secret Service Director Ronald Rowe led a walk-through of the incident site, where the suspected gunman, Ryan Wesley Routh, was able to get a weapon within 500 yards of the former president. Rowe stressed in a news conference that the agency’s methods had worked in averting catastrophe: “The protective methodologies of the Secret Service were effective yesterday.”

He also emphasized that Trump’s outing had been unplanned, forcing authorities to work on the fly.

“The president wasn’t even really supposed to go there,” Rowe said. “It was not on his official schedule.”

The episode adds to pressure on the Secret Service, which has been under scrutiny since a gunman gained a clear sightline to Trump at his July rally in Butler, Pa., firing several shots that grazed the former president’s ear. The rally shooting two months ago reflected what lawmakers and Secret Service leadership have described as a major security failure — poor planning, an unsecured roof that constituted an obvious risk and a breakdown in communication between federal and local authorities.

Secret Service leaders are already probing if any of those factors contributed to a gunman’s ability to once again get within striking distance of the Republican nominee for president. President Joe Biden on Monday urged Congress to consider increasing the agency’s funding, and the agency promised a new investigation.

The incident in West Palm Beach was in many ways a more predictable debacle. Indeed, Trump aides and Secret Service agents have long worried about his possible exposure while golfing. The issue, they say, is twofold. He selects locations to golf — his own clubs — that are particularly difficult to secure. And then he follows a highly predictable routine on any given weekend.

“People are saying, ‘How did [Routh] know he’d be there?’” said a former senior U.S. official. “Well, if you were looking for Trump on a Sunday afternoon, I can tell you where he’d be. Whatever golf course of his that was closest to where he was.”

Bill Gage, a former agent, said Routh probably didn’t need to do “very sophisticated surveillance.”

“He just had to sit and wait for Trump to arrive,” he said. “You don’t have to do a lot of guessing to know where he is going to be and that gives a bad guy time to prepare,” he said.

A criminal complaint filed Monday alleges that a cellphone used by Routh appeared to have been in the vicinity of the course for nearly 12 hours before he was spotted by a Secret Service agent, suggesting Routh may indeed have simply waited for Trump to appear.

Trump pitches and putts at his own private clubs, elite enclaves that are nevertheless open to some members of the public and their guests. The courses are located in heavily trafficked communities. And while they’re surrounded by some fencing, the greens lack hardened perimeters. The result is a security nightmare for the Secret Service and their partners in local law enforcement, especially without the added staff and tools devoted protecting the sitting president.

“At this level that he’s at right now, he’s not the sitting president,” the Palm Beach County sheriff, Ric L. Bradshaw, told reporters on Sunday. “If he was, we would have had the entire golf course surrounded. But because he’s not, security is limited to the areas that the Secret Service deems possible.”

Bradshaw said Routh was in an area of the shrubbery that allowed him to see two holes simultaneously — thereby eyeing both Trump and the agents moving one hole ahead of him in an elaborate protocol perfected over the years. Current and former agents said a countersniper team typically travels one hole ahead of Trump to scope out potential risks. Another countersniper team travels a hole behind to make sure there is no danger lurking in his wake as he moves forward on the fairway, protecting what’s called the “6 o’clock position.”

A countersniper agent, a counter assault agent and some of the members of his regular detail travel alongside Trump, who typically drives his own golf cart. Trump likes to play quickly and drive alone, even if friends or aides join him for a few holes, according to people who have accompanied him on the links.

The part of the course where Trump was playing at the time, Bradshaw added, is adjacent to both Summit Boulevard and S. Congress Avenue, busy thoroughfares near Palm Beach International Airport.

During Trump’s presidency, his golf outings were a constant source of consternation, according to former officials. Secret Service agents knew they wouldn’t be able to dissuade him from golfing, one former official said, so they asked him, mostly without success, to instead change his routine — at least to avoid going to the same club at the same time every week.

Trump’s practices differed from those of Barack Obama, who golfed frequently as president but usually at a course on the grounds of the military’s Joint Base Andrews in Prince George’s County or, while vacationing in Hawaii, on bases there. Such courses are insulated from public roadways, and anyone on the links would have undergone rigorous screening. Even high-ranking military officials were turned away if their tee times conflicted with a presidential outing, said Gage, the former agent, who worked protection for some of Obama’s golf trips at Andrews and in Hawaii.

Still, authorities have gone to great lengths to keep Trump safe while golfing. Agents kept a wider perimeter around him when he was president, establishing checkpoints at his clubs and trying to limit foot traffic around him, according to a former senior official.

Some of those practices have fallen by the wayside in recent years, according to club guests. People who have played at Trump’s club in West Palm Beach said they were surprised they weren’t screened more extensively or kept away from the former president. One person who played last year said he wasn’t asked any questions or subject to a bag search. After he finished his round, this person said, he walked into the clubhouse and took a corner table near where Trump later came to dine.

Trump’s security was bolstered following the July 13 shooting in Butler. The size of the Secret Service team protecting him on the links on Sunday was similar to the resources provided when he was president. A drone was in use Sunday to give agents an overview of the course, countersurveillance agents were deployed to survey the area and protective intelligence agents were on hand to assess possible risks, according to a Secret Service official briefed on the security plan.

The former president has expressed appreciation for the stepped-up security, which includes armed men of his golfing patrons, but has sometimes shown flashes of annoyance about the spectacle, said people who have been with him.

“People are coming to play golf,” he recently told an associate. “They don’t want to see that.”

Trump is hardly the first president to golf, or to come into the crosshairs of people who want to do harm.

William McKinley made the first presidential putt in 1897, but it was William Howard Taft who was arguably the first golfing president, bringing enthusiasm for the sport to the White House about a decade later.

The security challenges posed by the pastime became especially apparent in the 1950s, when Dwight D. Eisenhower, a golfing fanatic, occupied the White House. He had three favorite courses, according to the 2014 book “Hunting the President: Threats, Plots and Assassination Attempts — From FDR to Obama.” They were the Augusta National Golf Club in Augusta, Ga.; the Burning Tree Club in Bethesda, Md.; and the Cherry Hills Country Club near Denver A special cabin was built for Eisenhower at the Augusta club, with basement quarters for the Secret Service.

Two of Eisenhower’s hobbies bothered the Secret Service: putting as well as painting on the South Lawn of the White House, where the lighting was best. The president kept golfing but moved his painting indoors.

Three decades later, fear that golfing made presidents soft targets intensified when an armed man barreled through the gates of Augusta National while Ronald Reagan was playing the 16th hole. The intruder, Charles R. Harris, took five hostages and demanded to speak with Reagan. After the crisis, Reagan gave up golfing except for at the private course on the grounds of the Sunnylands Estate, owned at the time by his friends Walter and Leonore Annenberg, according to a 2005 book by a former longtime Secret Service agent, Joseph Petro.

“He said that he was giving up golf purposely because he was concerned about putting other people at unnecessary risk,” Petro wrote in the book, “Standing Next to History: An Agent’s Life Inside the Secret Service.”

This post appeared first on washingtonpost.com