A man was pepper sprayed, hit in the head with a hammer and robbed while he was sleeping in a tent in Culver City early Wednesday, police said.

Around 5:30 a.m., a man was reported to be “bleeding profusely from a head wound” at a Shell gas station located at 3801 Sepulveda Blvd., Culver City police said.

The victim explained to responding officers that he had been sleeping in his tent in a nearby encampment when two people allegedly walked in and attacked him.

The assailants took the victim’s Galaxy cellphone and $500 in cash, and took off in an unknown direction, police said.

Authorities did not have a description of the robbers.

The victim was taken to a hospital, where he had emergency surgery and is in critical condition.

Anyone with additional information about the attack is asked to call the Culver City police Sgt. Edward Baskaron at 310-253-6316 or the watch commander at 310-253-6202.