A man riding an electric bike struck a pedestrian in Hamilton Heights and then stabbed the victim during a fight afterward.

The 46-year-old victim was walking near the corner of Amsterdam Ave and W. 147th St. when the suspect crashed into him with his e-bike around 5 p.m. Saturday.

When the injured man started arguing with him over the incident, the suspect pulled out a knife and stabbed the victim in the left side, cops said.

Bleeding, the man hopped into a cab in search of medical attention before police stopped the car several blocks away and drove him the rest of the way to St. Luke’s Hospital.

He is expected to recover, officials said.

Police are still searching for the assailant.