Jamie Lynn Spears

Jamie Lynn Spears, Law enforcement in Hammond clarified the incident to TMZ ... saying they were mistaken and the fight where a girl was hit with a beer bottle, happened the night before the knife incident. Jamie Lynn and her friend were not involved.

The knife incident actually began when Jamie's friend was knocked over during a fight at the Pita Pit between a bunch of guys.

Britney Spears' kid sister is a sandwich shop vigilante ... who didn't hesitate to reach for the closest weapon when her girlfriend got into a brawl with another chick.

The violence broke out last weekend at the Pita Pit in Hammond, Louisiana -- Jamie Lynn Spears and a friend had made a late night stop for food, when ... according to sources close to Jamie ... someone attacked her friend.

Cops tell us Jamie's friend got clocked with a bottle. That's when Jamie went all "Saving Private Ryan" ... dragging her friend to safety. Our Spears sources say Jamie pulled her behind the sandwich counter -- then grabbed a long serrated bread knife and started waving it around to stop the fight.

We're told that did the job. Police showed up, but Jamie's friend didn't want to press charges ... so no one got arrested.

Hours before springing into action -- Jamie posted a pic looking calm and demure.

It's always the quiet ones.