Harrowing video shows the moments a yellow cab driver careened his out of control taxi onto a busy sidewalk before slamming into a Manhattan restaurant on Thursday afternoon.

The male cabbie crashed into the Westville Hell’s Kitchen, on Ninth Avenue near West 54th Street, shortly after 12:30 p.m., when he was rear-ended by another driver, police said.

Shocking surveillance footage obtained by the Post shows pedestrians walking along the sidewalk before one man, wearing a backpack, abruptly stops and unsuccessfully tries to move out of the way of the oncoming taxi.

Three people — two men and one woman — were partially struck by the taxi as the car barreled into the eatery, which was open at the time, cops said.

Eight total victims suffered non-life threatening injuries, and five people were taken to NewYork-Presbyterian Hospital for treatment, an FDNY spokesman said.

Dramatic photographs posted to Twitter show firefighters and medics responding to the scene.

“How does this even happen?!,” tweeted user @svzytrvn, along with a photograph of the wreckage. “I just walked by this taxi debacle in Westville in Hell’s Kitchen.”

No children were involved in the crash and both drivers remained at the scene.

The driver, who identified himself as MD Shunaiman said “wanted to hit the brake” when the other car rear-ended him, but, “when he hit me my car was going [quickly]…it was out of control.”

No criminality was immediately suspected, cops said.