An off-duty detective in Massachusetts told a driver that he would “put a hole” in the man’s head during a tense evening encounter that was caught on the driver’s dashcam video.

Medford Police Chief Leo Sacco told the Boston Globe that Detective Stephen LeBert was put on leave after the incident, which occurred Sunday night, when LeBert was not on duty.

“The language, the demeanor,” Sacco told the newspaper, in explaining his decision. “Just what is being said and how it is being said. I hate even being quoted as saying it, but ‘putting a hole in your head’ — that is uncalled for.”

Sacco also opened an internal investigation into the confrontation, the Globe reported.

The video shows LeBert in civilian clothes — a tank top and shorts — as he got out of a pickup truck and approached the driver. The driver backed up his vehicle as LeBert approached and pulled out his badge.

LeBert can be heard swearing at the driver in the recording, which apparently began after a possible traffic violation.

“I didn’t know you were a cop,” the driver responded.

“I’ll put a hole right through your head,” LeBert said. “Pull over.”

The exchange continued after the driver moved his vehicle. LeBert continued to curse at the driver, at one point telling him: “You’re lucky I’m a cop because I’d be beating the f—— p— out of you right now.”

“Jeez,” the driver said.

Uniformed officers eventually responded to the scene, and the situation deescalated.

You can watch the video here. [Warning: It contains profanities.]

“It was definitely nerve-wracking, when someone is like ‘hey, I’m gonna shoot you,’ ” the driver told CBS affiliate WBZ. The station identified the driver as “a software designer named Mike from Malden,” which borders Medford.

An e-mail to Sacco was not immediately returned, nor was a telephone message left by The Post on Wednesday.

This isn’t the first time LeBert’s actions have been questioned after they were videotaped. Footage from 2012 shows him rubbing the camera lens of a person who is trying to film law enforcement, Boston.com reported.

LeBert, who is smiling in that clip, was later instructed on how to “act accordingly,” Sacco, the police chief, told Boston.com.

Read More: