A small plane crash-landed onto a popular golf course near Sacramento on Sunday, mere feet from a bystander, as seen in security footage.

A video captured by Haggin Oaks Golf Course showed the plane crash sideways near the tee area for the 10th hole and skid across the pavement and grass, ending up right below the camera. The plane “came to rest up against the pro shop” without crashing directly into it, the Sacramento Fire Department said on X.

The fire department shared separate footage that showed the plane lying beside the shop, with one wing detached, and skid marks still visible on the putting green.

The pilot — though shaken up — walked away with only a cut to his hand, Sacramento Fire Captain Justin Sylvia told local media.

Upon arriving at the scene, officials learned that the single-engine Piper PA-28 departed from nearby McClellan Air Force Base but experienced engine failure soon afterward at an altitude of about 400 feet, Sacramento-based KTXL reported. The crash occurred around 1:15 p.m. local time on Sunday, the Federal Aviation Administration said in an emailed statement.

“Everyone’s very lucky … because there’s a parking lot full of cars here, there’s a freeway nearby, there’s houses nearby,” Sylvia told the outlet, adding that the pilot had “picked a golf course” for his emergency landing, “which is a pretty good location — nice and open. … It’s very fortunate that no one was injured, including the pilot.”

The Federal Aviation Administration, in its report on the incident, said the crash caused “substantial” damage to the aircraft, with “minor” injury to the crew member.

Ken Morton Jr., the golf club’s vice president of retail and marketing, told USA Today there were about 200 people on the course at the time the plane crashed.

Haggin Oaks Golf Course closed its restaurant and pro shop for the rest of the day but said damage to the facility was minor.

“We are incredibly grateful to the first responders from the fire department and law enforcement for their swift and professional reaction,” the club said in a Facebook post.

📢 Important Announcement from Haggin Oaks Golf Complex Earlier today, there was an unexpected plane crash on our golf…

Posted by Haggin Oaks Golf Complex on Sunday, August 4, 2024

The FAA and National Transportation Safety Board are investigating the incident, the FAA added in its statement.