A man taking an evening stroll near San Francisco's Lake Merced got a horrifying surprise Wednesday, when an assailant leapt from the bushes and started bashing him with a pipe.

Police say that the 47-year-old male victim was walking on Lake Merced Boulevard near Winston Drive, near the San Francisco State University campus, at 5:58 p.m. when the assault occurred.

According to the San Francisco Police Department, while on his walk a 43-year-old man "jumped out from the bushes and began to attack [the victim] with a metal pipe."

Police rushed to the scene and managed to detain the suspect on suspicion of aggravated assault. The victim, who sustained injuries to the head, was transported to an area hospital. According to the SFPD, his injuries aren't life-threatening, and he's expected to recover.