It was a scene that would make Carl Spackler proud: a groundskeeper at Trump National Golf Club, eye to the scope of a rifle, taking aim at a hardened golf course menace — a gopher.

That was the unorthodox scenario that appeared to play out last week on the picturesque, cliffside Rancho Palos Verdes course built by the New York real estate mogul who now occupies the White House.

Though no one from the golf club would confirm what could be seen in plain sight, the gopher hunter appeared to be taking a page out of the 1980 movie “Caddyshack,” which starred Bill Murray as a gopher-obsessed groundskeeper whose character employed various forms of lethal violence in a largely futile bid to rid the fictional Bushwood Country Club of a destructive rodent.

At Trump National, the rifleman — ostensibly a groundskeeper — was ushered around the 18-hole course in a golf cart as he took aim at various points. A gopher or gophers were the likely target because the critters often wreak havoc on golf courses.

But it’s not clear what ammunition was fired, what safety precautions course officials took or whether staff should have been allowed to heft such firepower against a gopher in the first place.

The city of Rancho Palos Verdes prohibits firing weapons inside city limits. According to city code, it is illegal for anyone to discharge any “gun, revolver, pistol, firearm, spring gun, air gun, sling, slingshot” or other contraption meant to shoot a projectile or ammunition.

Another section of city code allows shotguns to be fired, but only to protect agricultural crops, and that requires a special permit from the city. No such permit has been issued in roughly a decade, said Deputy Planning Director So Kim.

No warning to law enforcement

Lomita sheriff’s Lt. Alise Norman said she wasn’t aware of any notice from staff at the golf club that a firearm would be used at the course along Palos Verdes Drive South. Normally, if a weapon is going to be fired, course executives would advise the department to avoid any confusion or response from law enforcement, Norman said.

Using a weapon to manage pests is not a common practice at other courses in the area, either.

Kerry Welsh, former communications director and current member of the Rolling Hills Country Club, was surprised to hear of a firearm used for pest control. It’s not a normal extermination method, he said.

“They will trap them, they’ll use poison and things, but I’ve never heard of anybody using a rifle on a golf course,” Welsh said.

He later added, however, that the club’s general manager said that while the practice isn’t the norm in Southern California, it is employed more commonly in the Midwest and rural areas.

No guns at county courses

Chris Belcher, interim manager at Chester Washington Golf Course near Inglewood, said that’s not how the Los Angeles County course handles pests on the links. Staff there tend toward trapping or poison to keep the burrowing rodents from tearing up the grass, he said.

“We’re not that aggressive,” Belcher said.

Terry Kankari, a spokesman for Los Angeles County Parks and Recreation, added that the county doesn’t use firearms on any of its 20 courses. County parks and recreation staff don’t use guns in any of their duties, he said.

Lili Amini, general manager at Trump National Golf Club, did not respond to requests for comment.

President Donald Trump, who owns 17 golf courses throughout the world, opened Trump National, Los Angeles in 2006. The previous owners sold the course for $27 million in something of a fire sale after most of the 18th hole — green, fairway and all — slid into the Pacific Ocean during a landslide. Trump invested more than $250 million to repair and upgrade the course, which is not a private club but rather open to the public.

Trump National, which was the target of vandals in March and protesters in May, has seen a decline in business since Trump was elected president in November.

Correction: This story has been updated with Kerry Welsh’s correct title as the former communications director for the Rolling Hills Country Club.