Four masked gunmen broke into a North Valley Stream apartment early Tuesday, pistol-whipped the man who lives there and made off with cash and jewelry, Nassau County police said.

Fifth Squad detectives said the four men, armed with black handguns, kicked in the side door of a house on 237th Street at about 12:45 a.m., then attacked a man, 28, in a basement apartment.

They struck him on the back of the head and demanded money, police said. They then took an unspecified amount of cash, jewelry and car keys before fleeing “by unknown means,” police said.

The victim, who had a laceration to the head, refused medical aid.

advertisement | advertise on newsday

Police said the men, who took the car keys but not a vehicle, were between 20 and 30 years old.

All wore masks or hoodies, including one in a white “Scream” Halloween mask.

Anyone with more information can call Crime Stoppers at 800-244-8477. All information will be kept confidential.