A for-hire driver hopped out of his car and beat a pedestrian in the middle of a Brooklyn street early Sunday in an apparent incident of road rage, as a surveillance camera captured the frightening incident.

Farrukh Afzal, 37, was driving at 46th Street and 13th Avenue in Borough Park around 7:30 a.m. when he slammed on the brakes, jumped out of his vehicle and started pummeling Lipa Schwartz, 62, who was wearing traditional Hasidic attire, cops said.

Harrowing surveillance footage shows the assailant towering over the victim in the middle of an intersection, grabbing him from behind and repeatedly punching him in the head.

Schwartz, who suffered a split lip, cut ear and other injuries, told the blog BoroPark24, “I feared for my life. I knew it was either fight my way out of this or I might be dead.”

He said he was walking to a synagogue at the time and that he thought the driver “seemed to want revenge,” although he didn’t say for what.

A lawyer for Afzal, though, claimed that Schwartz had punched the vehicle’s window as he was crossing the street and that Afzal feared for his life.

Afzal, who locals said drives for a car service, is not licensed by the city’s Taxi and Limousine Commission and has been summonsed in the past for being an unlicensed operator, a TLC spokeswoman said.

Prosecutors said the incident began as Schwartz was crossing at the intersection. Afzal honked at him as he thought the man was going too slowly. This led to the two men yelling at each other and Schwartz allegedly punching the car’s window and, finally, Afzal getting out and allegedly committing assault.

Afzal, of Staten Island, originally was arrested on charges that included assault as a hate crime.

But at his arraignment late Sunday, the incident was not treated as such and he was charged with attempted assault in the second degree, assault in the third degree, menacing and harassment and held in lieu of $15,000 bail.

Cops said he has eight prior arrests.

Additional reporting by Tina Moore