Cops have charged the whackjob who beat a 91-year-old Manhattan man with a cane Friday evening.

Saul Nunez, 19, allegedly savaged nonagenarian Juan Llorens with a walking stick on an Inwood sidewalk around 6 p.m. Friday.

The elderly victim was pushing a cart down the sidewalk on Broadway near his West 204th Street home when Nunez, who was wearing pajama pants and carrying a walking cane, clobbered the poor old man, grisly security footage shows.

Good Samaritans intervened, but Nunez fled before they could capture him.

Llorens suffered a bloody gash on his left ear that needed stitches to close, but he was up and moving around Saturday.

Nunez was arrested Saturday and charged with felony assault and criminal possession of a weapon — the cane.

He is being held at Bellevue Hospital and expected to be arraigned Sunday.

It is the latest in a string of apparently random attacks on seniors — over the last two months, three other seniors were brutalized in broad daylight.