EXCLUSIVE

Jon Gosselin pulled a gun on a photog in Pennsylvania yesterday -- then fired off a warning shot before chasing her away in his car ... and TMZ obtained photos of the scary encounter.

It all went down yesterday in Beckersville, PA when a photog (not ours) followed the reality star home from his new waiter's gig ... trying to snap photos of the cabin where Jon lives.

The photog fessed up ... she followed him off the main roads and onto dirt roads ... but assumed it was a public road and not private property.

We're told as soon as she started snapping away ... Jon made an aggressive bee-line for her ... then pulled a gun out of the back of his pants.

The photog says Jon started yelling at her for trespassing ... then fired off a warning shot.

The photog says she booked it ... but Jon followed her until she got back on the main road.

We're told the photog plans to hit up local police this afternoon to file a report.

11:00 AM PT -- Checkmate! The photog just went to the cop shop and she saw the light -- if she filed a complaint the police would have probably ended up charging HER with criminal trespass.