An NYPD school safety agent taught his pothead son a lesson by pummeling him on the head — with a pot, police sources said.

Juan Lopez, 62, returned home at about 10:30 p.m. Tuesday and caught his 27-year-old son toking up in their Washington Heights apartment, sources said.

Emotions boiled over as the two started arguing — before Lopez flew off the handle and allegedly struck his son with the kitchen cookware, sources said.

Lopez’s son dialed 911 and was taken to New York Presbyterian/The Allen Hospital with “noncritical injuries,” sources said.

Lopez was busted on charges of assault and criminal possession of a weapon — the pot. He was suspended from his Manhattan job.