A confrontation at hot spot SL between “Gossip Girl” star Ed Westwick and a customer at a nearby table ended up with Westwick allegedly taking a swing — and the other man being thrown out.

According to a witness, Westwick blew up when he thought the other guy was trying to take his picture Thursday night.

But when Westwick missed his mark, he then asked security to toss his intended target from the boîte.

The Brit actor was camped out at a table with some friends, sources tell us, when a patron at another table began taking pictures.

“Ed thought that one of the guys from the next table was taking a photo of him,” said a witness. “But he was really just trying to get a shot of his girlfriend. Ed freaked out. He leapt up and tried to punch the guy, but completely missed.”

Westwick’s supposed target, who asked that we not use his name, told us the star first lunged at him to try to get the camera and then took a swing. Westwick also yelled, “You don’t take [bleeping] pictures of me,” the customer said.

The man claimed he asked Westwick to “chill out.” Then, according to the customer, Westwick called over a bouncer and complained he was trying to start a fight — and the bouncer said, “Hey, buddy, it’s time to go.”

A rep for Westwick declined comment. A rep for SL said, “This never happened — Ed had a great time and there was no conflict of any kind.”

Also at SL, Westwick was seen asking DJs The Chainsmokers to play a song from his own iPod. Earlier in the night, Westwick was seen partying at Plunge and also hit new Mondrian SoHo hot spot Soaked.

Page Six reported last year that Westwick at Westside Tavern unplugged the joint’s iPod without asking, plugged in his own and later got into a shoving match outside with the husband of a woman who’d asked him to leave.