New York Police Department officer Ryan Nash was on a routine call Tuesday—looking for an emotionally disturbed person—when he came across terror suspect Sayfullo Saipov in the midst of a killing spree.

Nash’s instincts kicked into high gear and he acted quickly, gunning down Saipov near Stuyvesant High School at Chamber and West streets before he could cause any more damage.

Nash, 28, who is stationed in the 1st Precinct, stopped the killing spree by shooting Sayfullo Saipov near Stuyvesant High School at Chamber and West streets on Tuesday, police sources said.

Saipov shouted “Allahu akbar!” — Arabic for “God is great!” — after allegedly ramming a Home Depot rental pickup truck into people along a bike path, killing eight. He then whipped out two weapons — which turned out to be a paintball gun and a pellet gun — as he ran from his smashed truck.

Nash gave chase, drew his weapon and opened fire, bringing down the 29-year-old suspect before he could do any more harm, law enforcement sources said.

Nash, who lives in Medford, Long Island, was taken to Bellevue Hospital, where he was treated for ringing in his ears.

For more on this story, click the "read more" button below.