Harry Styles knows when you're onstage you're supposed to give performers a hand ... which may be why he grabbed Jimmy Kimmel's ass.
Harry and the rest of One Direction were guests on Kimmel's show Thursday and it all looked kosher from the front. What viewers didn't see was the ass grab from behind.
The performance was pretty epic BTW ... Hollywood Blvd was shut down for all the 1D fans ... one of whom snapped the butt pic.
Looks like Kimmel's reflexes kicked in pretty quick ... he kept a straight face.