"You think you're funny... But you're just an arrogant, bullying toerag, Potter. Leave him alone."
-- Lily Evans to James (OP28)
During a break from testing in their fifth year, the group of Gryffindor friends known as the Marauders – James Potter, Remus Lupin, Peter Pettigrew, and Sirius Black – are sitting outside on the Hogwarts grounds near the lake with their classmates. James releases and catches a stolen Snitch, Remus studies, and Sirius Black taunts Peter Pettigrew for being “thick” on an exam question about a werewolf. When Sirius complains about boredom, James spies one of their favorite targets, Severus Snape, sitting alone and decides to start a confrontation with him.
Shouting out their favorite nickname for Snape – “Snivellus” – James disarms him with “Expelliarmus,” and uses the Impediment Jinx to make him fall down. As other students gather around watching their victim struggle on the ground, Snape begins to shout curses and hexes at James, who then casts “Scourgify” to fill Snape’s mouth with pink soap bubbles, gagging him. At that point, Snape’s childhood friend from Cokeworth, Lily Evans, comes forward and tells them to “Leave him alone!”
As Lily tells James off, Snape manages to get his wand back and hits James in the face with a cutting spell, possibly Sectumsempra. Angered, James retaliates with a silent “Levicorpus,” turning Snape upside down and allowing everyone to see his underpants. Lily again intervenes and makes James release him, but the harassed Severus made a dire mistake and yells “I don’t need help from filthy little Mudbloods like her!” That was to be one of the greatest regrets of his life, and a major reason his friendship with Lily soured.
Trying to make Snape apologize, James turns him upside-down again, and as Lily walks away, James threatens to de-pants him in front of the crowd (OP28).
Snape referred to James, possibly to this incident, as he was fleeing Hogwarts after killing Dumbledore on the Astronomy Tower and Harry shouted that he was a coward: ""Coward, did you call me, Potter? ...Your father would never attack me unless it was four on one, what would you call him, I wonder?" (HBP28)
This scene was filmed for the OP movie, but footage of the Lily/James confrontation with Harry present in the background was not used, nor was the memory found in the Pensieve. Instead, Harry sees the memory in Snape's mind during Occlumency as a short, quick montage of Snape being attacked by James and hung upside down as he threatens to "take off Snivelly's trousers." (OP/f) Also missing from the movie is follow-up scene in which Harry is so disturbed by the memory that he asks Sirius and Lupin why they did it (OP29).