A woman was beaten with a firearm and then raped by a masked gunman near a Staten Island NYCHA complex, cops said Friday.

The 37-year-old woman was attacked near the Berry Houses at Dongan Hills Ave. and Jefferson St. around 6 p.m. Wednesday, police said.

The creep struck the victim with the gun and then sexually assaulted her, according to law enforcement.

Medics rushed her to a local hospital for treatment.

The NYPD released a composite sketch of the rapist, who was wearing a hood and mask during the attack.

Anyone with information is asked to call Crime Stoppers at (800) 577-TIPS. All calls will be kept confidential.