A JFK-bound flight was delayed at the San Francisco airport Friday by a pilot who refused to squish a six-inch garter snake on the runway, officials said.

The Delta Air Lines pilot had announced a delay in takeoff to waiting passengers, explaining that a worker had been dispatched to snatch a wayward reptile off the runway, according to fliers tweeting from the plane.

A spokesman for San Francisco International Airport later said the snake was caught and set free in a “grassy area.”

Federal law requires airports to keep wildlife off runways and prevented the pilot from running over the snake.

“In this case, it’s out of an abundance of caution, but it is a federal mandate,” the spokesman said.

“You don’t want wildlife or debris on the runway. It’s not agreeable to the safe operation of the aircraft.”

The snake was spotted, likely by crew, near the edge of the runway, he said.

“It’s not uncommon to see garters around here. The pavement is a light color of gray, and the snake is dark, so it wouldn’t be difficult to see,” he said.

An airfield safety officer quickly caught the snake as passengers stood by, sources said.

The flight was delayed only a few minutes and arrived on time at JFK at 3:10 p.m., a Delta spokeswoman said.

“This situation is a first,” she said.

Travelers agreed it was bizarre and took to Twitter to broadcast the holdup.