PATERSON — A man accused of shooting a 14-year-old about two dozen times with a paintball gun at close range has been charged with aggravated assault.

Edwin Perez is also charged with child endangerment and two weapons offenses. The 21-year-old Paterson man turned himself in Thursday morning and was due to appear in court later in the day.

But it's still not clear what led to the attack.

Authorities say the 14-year-old victim was shot 20 to 25 times at close range Monday night when he answered the door at his family's Paterson home. They say the assailant surprised the teen, who was hospitalized with severe welts and deep bruising on his arms, legs and torso.

The boy, identified by News 12 New Jersey as Brian Caballo, told Paterson police that the shooter was the adult brother of a school friend. Caballo answered a knock at the door and the man began shooting from five feet away, police said.

The boy's mother, Carolina Vasquez, told CBS New York that the family has been on edge with her son afraid that the gunman would return with a real gun.

It wasn't known Thursday if Perez has retained an attorney. His first court appearance is Thursday afternoon.

Material from the Associated Press was used in this report.