A Bangladeshi man out for dinner at a Bronx restaurant was viciously beaten hours after the Boston Marathon bombing by thugs who called him “a f–king Arab” before pummeling him to the ground, sources said.

Abdullah Faruque, 30 — a native of the South Asian country who grew up in The Bronx — was at Applebee’s on Exterior Avenue in Melrose at about 11:30 p.m. Monday when he went outside for a smoke.

Three or four Hispanic males he’d noticed drinking at the bar followed him and angrily got in his face, he recalled yesterday.

“One of the guys asked if I was Arab. I just shook my head, said like, ‘Yeah, whatever.’ I didn’t even know that [the] Boston [bombing] happened because I had a busy day,” Faruque said.

He turned to head back inside as one of the men snarled, “Yeah, he’s a f–king Arab,” and the gang pounced, punching him on the head and body, dislocating his left shoulder and leaving him semiconscious.

“Before I could grab the door, they started swinging at me,” the network engineer said of the 90-second beatdown. “I’ve been jumped before. If you can’t win, you back up, you try to protect yourself.”

The victim said he went home and turned on the TV, and only then learned about the bombing and put two and two together.

“I saw the news, and then it hits me: That’s why I got jumped,” he said.

The NYPD’s Hate Crimes Unit is investigating.