An Orthodox Jew walking home from work in Brooklyn early Friday was brutally attacked by a pack of thugs playing the “knockout game” — leaving him sprawled on the ground with a giant lump on his forehead, law-enforcement sources told The Post.

Shmuel Perl, who was wearing a yarmulke, had nearly reached his Borough Park home at 2:45 a.m. when he overheard four drunken punks blabbing about “knockout” — the sick social-media-driven game in which participants sucker punch passers-by with the goal of knocking them unconscious, sources said.

“I was walking home on the way back from my job. I came across a group of people who were walking towards me, and I was able to hear them speaking loudly about this knockout game,” Perl, 24, said in a video interview obtained by The Post.

One of the hoods challenged another in the group, saying, “I know you can’t do it,” as another chimed in, “No, you can’t do it.”

“Yeah, I can do it! Look, I’ll do it to this guy!” one of the gang, a 28-year-old with a lengthy rap sheet, allegedly shouted.

The man then allegedly belted Perl square in the face, the sources said, making him the latest victim of the vicious game that has been on the rise across the country and has terrified New York City’s Jewish neighborhoods.

“As I’m walking on the sidewalk, the group surrounds me, and one of them, as I try to get away, one of them stepped out towards me and, with a closed fist, hits me in the face,” Perl said in the video, which was recorded by Shomrim, the Orthodox Jewish neighborhood patrol.

“As I was able to walk away from them, they called after me, ‘Come back. I can do this. I will knock you out.’ ”

Perl wasn’t seriously injured and quickly called Shomrim.

Four suspects, who had been celebrating the alleged puncher’s birthday, were collared at the scene. Charges were pending ­Friday night, sources said.

The NYPD is investigating eight other recent attacks against Jewish people to determine whether they were also part of the trend.

In Jersey City, a 46-year-old homeless man died in September after someone sucker-punched him and he hit his head on a fence.

The knockout game has gained popularity across the country as participants have gone online to boast about their assaults.

Additional reporting by Erin ­Calabrese and Dana Sauchelli