The suspected Boston Marathon bombers, Tamerlan Tsarnaev, 26, and Dzhokhar Tsarnaev, 19, were planning to drive to New York City in order to set bombs off in Times Square, Mayor Michael Bloomberg and New York police commissioner Ray Kelly said Thursday in a press conference.

Dzhokhar reportedly told interrogators that he and his brother made a spontaneous decision to try to bomb New York City after carjacking a Mercedes SUV. Their plans were reportedly spoiled when, low on gas, they stopped at a gas station and let the car owner escape. The victim's release led to the confrontation with police in Watertown, Mass., that resulted in the shootout that killed Tamerlan.

At the time, they had five explosives in the car: One pressure-cooker bomb like the ones used at the Boston Marathon and five smaller pipe bombs.

Officials knew the brothers were trying to drive to New York City after the car-jacking victim claimed Tamerlan said to him: "We just killed a cop. We blew up the marathon. And now we're going to New York. Don't [expletive] with us."

Initially, the NYPD said the brothers were coming to New York City to "party," not to plant more bombs, according to NBC News. Dzhokhar's story changed, however, in a subsequent interview as he became more "lucid," according to The Boston Globe.

NYC police commissioner Kelly said that Dzhokhar had been spotted twice in New York City before the attacks: On April 18, 2012, and again in November 2012, although it was unclear whether the visits were connected to any plans to bomb the city.

The mayor's office said on Twitter that the Tsarnaevs would have been greeted by a large number of officers deployed to various parts of New York City after the news of the Boston Marathon attack broke:

Heavy police presence or not, Bloomberg expressed relief that New York City didn't end up facing its own bombing. "We don't know if we would have been able to stop the terrorists had they arrived here from Boston," Bloomberg said, according to The Associated Press. "We're just thankful that we didn't have to find out that answer."