SAN JOSE — A man was hospitalized early Monday after being beaten with a martial arts-style weapon by an attacker who first queried the victim about his gang affiliation, according to police reports.

The victim was sitting in the drivers seat of his car around 12:30 a.m. outside his apartment complex on the 5700 block of Via Monte, near the intersection of Almaden Expressway and Blossom Hill Road in South San Jose.

He was with several friends, and two males drove up in a vehicle and asked the group what gang they are associated with, according to the report.

That led to an altercation, and one of the men broke out the driver’s side window of the victim’s vehicle. The victim got out, and was struck twice with “a nunchaku-type weapon,” according to the report.

He was taken to the hospital and treated for injuries not considered life-threatening. The attackers fled the scene and remain at large, according to police.

Contact Eric Kurhi at 408-920-5852. Follow him at Twitter.com/erickurhi.