When an ominous object was tossed into the lap of NYPD officer Peter Cybulski as he sat in a police van in Times Square late Wednesday night, the 24-year-old cop thought he and his partner were going to die.

“Boss, it is a bomb!” Cybulski yelled to his driver, Sgt. Hameed Armani, a 10-year veteran and Afghan immigrant living in Queens.

What happened next to the two cops, on special duty for Times Square security, put them right into a bizarre episode that for several hours raised fears of possible terrorism in New York City and led to the capture of an apparently disturbed Queens man several hours later in Columbus Circle.

The incident also underscored how important the bravery and quick thinking of two cops could be in a city considered a major terrorist target.

Determined to save hundreds of tourists from possible death and injury, Armani made the split-second decision to drive the van away from the crowded tourist spot before whatever it was in the van detonated.

“We looked at each other and I said ‘we are going to go but I’m not going to have other people go with us,’ Armani, 38, told reporters Thursday, recalling during a news conference how he drove away from the crowds to 46th Street and Sixth Avenue.

“We both said our prayers,” added Cybulski, 24, a graduate of Riverhead High School and St. Johns University.

advertisement | advertise on newsday

The cops took the device out of the van on the less-crowded street and discovered it to be a candle, a cylindrical object and some lighting components all wrapped in a white towel, NYPD Chief of Department James O’Neill said.

The drama continued a few blocks north when officers observed a gold SUV matching the description of the vehicle from which the hoax bomb was thrown near Columbus Circle. Cops tried to get the driver, identified as Hector Meneses, 52, of Elmhurst, Queens, to communicate but he refused. They then called for reinforcements.

After hostage negotiators tried to talk with Meneses, who said he had explosives, Columbus Circle was sealed off and traffic diverted. A special police robot was used to view the interior of the car and no explosives were found.

Cops took Meneses, an immigrant from Colombia, into custody at 7:45 a.m. Thursday and charged him with making terroristic threats, reckless endangerment and other offenses.

NYPD Commissioner William Bratton called both Cybulski and Armani heroes “of this department and of this city.”

“They put their own lives at risk so that they could save potentially hundreds, if not thousands, of people in Times Square,” Bratton said.

“We come to work every day not knowing what is going to be thrown at us,” Cybulski said.

“Quite literally,” added a smiling Bratton.

Cybulski’s mother, June, of Riverhead said her son is a three-year veteran whom she worries about constantly, not sleeping until he texts her at night when his shift ends.

“He is always my hero,” she said.