A nearly six-hour standoff in Columbus Circle ended Thursday morning when a suicidal man wearing a red helmet suspected of tossing a hoax bomb into a police vehicle was taken into custody without incident.

The man, identified by police as Hector Meneses of Queens, was taken into custody on a stretcher at around 8 a.m. after cops were forced to pepper spray him, police said.

Dozens of officers, their guns drawn, had surrounded the car and SWAT team members had cleared the circle, as they brought in equipment to deal with Meneses.

“I have a bomb strapped to me, and I want to die,” he’d told cops, according to police officials.

Hours earlier, police said Meneses, 52, flung what appeared to be a crudely made contraption into the police car at Duffy Square in Times Square about 11:30 p.m.Wednesday.

Surveillance video shows the moment when Meneses drives by the police van and tosses a white package through the passenger side window.

Officer Peter Cybulski and Sgt. Hameed Armani were inside the patrol car — and feared the worst.

“We both looked at each other and we knew exactly what the other was thinking without even having to say it,” Cybulski said at a press conference this morning. “[It was] a very crowded area, multiple children around, multiple families around. We’re not going to let this take out someone else with us, multiple casualties.”

The two cops started “praying,” according to Armani, a 10-year veteran of the department who immigrated from Afghanistan.

“I was nervous. [Cybulski] looked at me and said ‘Boss, what are we doing?,” Armani said.”’ I said ‘we’re driving, alright.’” Halfway through we said our prayers to each other and I was like, alright, if it happens it happens. I’m not going to stop here.”

The officers moved the vehicle to 46th Street and Sixth Avenue, where they placed the device — which turned out to be a red candle and white t-shirt wrapped in tinfoil with two solar garden lights — on the sidewalk, away from pedestrians, sources said.

The cops then got out of the vehicle and the bomb squad responded. It gave the all-clear shortly after 1 a.m.

Commissioner Bill Bratton later hailed the officers as “heroes of New York City.”

At around 1 a.m., detectives doing a video canvas in the Columbus Circle area spotted and stopped the suspect’s 2008 Chrysler Aspen, but he refused to get out of the car, rolling up his window and reaching for the glove compartment instead.

“Upon stopping the SUV, a male driver was observed placing a red plastic helmet on his head,” said NYPD Chief of Department James O’Neill at a morning briefing.

Meneses was also wearing a “hunting or fishing vest” that officers believed was packed explosives, Chief of Manhattan Detectives William Aubrey said at the press conference. At one point, he opened a center console inside his car, and officials said he kept one of his hands hidden during much of the hours-long standoff.

Police officials deployed a bomb robot so they could communicate with Meneses through a camera attached to the electronic contraption, but Meneses ignored them, Aubrey said.

The robot scanned the interior of the vehicle for possible explosives, sending a live feed to police officials, who spotted what appeared to be a pressure cooker bomb in the trunk, Aubrey said.

“He tried to simulate a pressure cooker with wires coming out,” Aubrey said. “Also there is a remote control in there. It would be your typical electric fireplace type remote control that he had it in his hand the entire time, as if simulating, ‘I’m going to press this and I’m going to detonate this device if you come closer.'”

After taking Meneses into custody, police combed through his car for explosives, but only found a pot with a cap and wires along with 19 LED lights.

Meanwhile, detectives showed up this morning at Meneses’ home on 31st Avenue in East Elmhurst Queens, where he lives with a male roommate who was taken in for questioning.

He has no prior psychiatric history and no arrest record, police officials said.

Carlos Ponce, who works as a welder next door, called Meneses, who works as a driver, a “nice guy.”

“He was OK. He was always talking and friendly. I don’t know what happened, I’m surprised. He said he works for a limo company,” Ponce said.

Meneses applied for a TLC license in April 2014, but his application was still pending, a TLC spokesperson said.

His ex-landlord was stunned by the news of his former tenant.

“I am so surprised. Why would he do that? It’s not like him. He is a nice, quiet man,” said landlord Lucia Amaral, 75, adding that Meneses was “having money troubles.”

About three weeks ago I had a garage sale and I had asked him to help out,” Amaral said. “But I didn’t hear back from him. I can’t believe this is the same person. He used to work at La Guardia airport as a guard. He has been unemployed for some time.”

Additional reporting by Shawn Cohen