Play video content EXCLUSIVE TMZ.com

Queens of the Stone Age frontman Josh Homme got into a nasty name-calling exchange with a fan waiting for an autograph, and things nearly got physical.

TMZ got this video of Homme berating the guy -- who says he's a teacher -- Thursday night in Detroit. Homme was leaving an after-party for one his shows, and sources outside tell us the teacher asked for his John Hancock.

We're told Homme thought the guy was just trying to sell autographed memorabilia, and wasn't a real fan. Watch how the singer blew up, calling the guy a "f***ing loser" and a "spoiled mother f***er."