Dramatic surveillance footage captured the moment a pedestrian narrowly missed being hit by an out-of-control SUV before it slammed into a Long Island insurance office.

The wild incident unfolded at a strip mall in West Islip around 2:40 p.m. Tuesday, according to police.

In the footage, the man can be seen exiting an adjacent pizza joint and walking on the sidewalk moments before he’s forced to jet out of the way of the oncoming Subaru Forester, which accelerated, jumped the parking lot curb and plowed through the front of the Hometown Insurance Agency.

The vehicle came to a stop halfway inside the building, which suffered damage from the collision.

“He’s very lucky. He’s very, very lucky,” John Raimondi, the owner of Our Little Italy Pizza — the restaurant the man walked out of — said of the pedestrian, according to Newsday.

Raimondi told the outlet that shortly before the crash, the lucky customer bought a couple of slices of pizza and took them to his car, but returned to the shop after he forgot his keys.

As the man exited the pizzeria for the second time, the wreck happened.

“I heard glass shattering and it sounded like a car went through the building,” Raimondi said, adding, “It was very loud.”

The Suffolk County Police Department said an 86-year-old man was driving the Subaru with his wife, 82, in the passenger seat when the vehicle struck the building.

The couple was taken to Good Samaritan Hospital Medical Center in West Islip with minor injuries, cops said.

“You could tell they were very shaken up,” Raimondi said of the elderly pair.

Miraculously, no one inside the insurance office was injured.

It was not immediately clear what caused the crash.

No arrests were made.

Hometown Insurance Agency did not immediately return a request for comment Wednesday, but an employee’s voicemail recording addressed the crash, calling it an “unexpected occurrence.”

“I apologize for any delay … We had a vehicle crash through the front of our building. All staff members and personnel are safe, thank God,” the message said. “We hope to be back open tomorrow to be able to return calls.”