A Queens motorist posed as an undercover cop — and then punched him for no good reason, police said Saturday.

The hostile driver was flashing his high beams at a man in a nearby car at the intersection of Hoyt Avenue North and 26th Street in Astoria on Aug. 24 when the 38-year-old victim got out of his vehicle and confronted him, officials said.

The driver then pulled out a badge and claimed to be an undercover cop, police said.

When the victim tried to snap a photo of the faux officer’s license plate, the angry driver slapped the phone out of his hand, then punched him.

The driver’s friend, who was in the passenger seat, then quickly snatched the victim’s phone, and the pair sped off in their car, officials said.

The victim was taken to Mount Sinai Queens Hospital for his injuries and later released.

The driver is described as in his mid 20’s with facial hair and wearing a dark T-shirt and jeans, police said.

Police said there was no indication that the irate driver was actually an undercover agent